On 6 June 2010 16:18, Gaal Yahas <[email protected]> wrote:

> Note also this from perlfunc for "caller":
>
>               Furthermore, when called from within the DB package,
> caller returns more detailed
>               information: it sets the list variable @DB::args to be
> the arguments with which
>               the subroutine was invoked.


It's not really clear from the docs how to use it, but this does the trick:

    my @args = do { package DB; caller(); our @args };

This is also available from a few CPAN modules, BTW.
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to