NAME

Devel::Chitin::Location - A class to represent an executable location

SYNOPSIS

  my $loc = Devel::Chitin::Location->new(
                package     => 'main',
                subroutine  => 'main::foo',
                filename    => '/usr/local/bin/program.pl',
                line        => 10);
  printf("On line %d of %s, subroutine %s\n",
        $loc->line,
        $loc->filename,
        $loc->subroutine);

DESCRIPTION

This class is used to represent a location in the debugged program.

METHODS

  Devel::Chitin::Location->new(%params)

Construct a new instance. The following parameters are accepted. The values should be self-explanatory. All parameters except callsite are required.

package
filename
line
subroutine
callsite

Represents the opcode address of the location as reported by Devel::Callsite::callsite(). This value will only be valid if the optional module Devel::Callsite is installed.

Each construction parameter also has a read-only method to retrieve the value.

at_end

Return true if the location refers not to any location in the program, but after the program has ended.

SEE ALSO

Devel::Chitin::Exception, Devel::Chitin, Devel::Callsite

AUTHOR

Anthony Brummett <brummett@cpan.org>

COPYRIGHT

Copyright 2016, Anthony Brummett. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.