The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

UNIVERSAL::source_location_for - Get source filename and line number of a subroutine

SYNOPSIS

    use UNIVERSAL::source_location_for;
    use File::Spec;
    my ($source_filename, $line)
        = File::Spec->source_location_for('canonpath');

DESCRIPTION

This module supplys a universal function "source_location_for", a perl implementation of the method Method#source_location of Ruby.

It's useful for debug.

Functions

Module->source_location_for('method')

Reuturn source filename and line number of the subroutine.

AUTHOR

Fuji, Goro (gfx) <gfuji(at)cpan.org>

Hiroki Honda <cside.story <at> gmail.com>

LICENSE AND COPYRIGHT

Copyright (c) 2012, Hiroki Honda.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.