Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • by broquaint (2964) on 2002.04.20 14:01 (#7313) Journal
    Here's some basic test code and subsequent output for anyone interested.
    use strict;
    use warnings;

    use MySub;

    sub foo {
        print "in foo()\n";
        my $lv = "a lex var in foo()";

        my sub bar {
            print "\tin bar()\n";
            print "\tgot args - @_\n";
            print "\t\$lv is $lv\n";
            my $bar_args = \@_;
            my sub quux {
                print "\t\tin quux()\n";
                print "\t\tbar() args = @$bar_args\n";


        &bar(qw(a bunch of args));



    in foo()
            in bar()
            got args - a bunch of args
            $lv is a lex var in foo()
                    in quux()
                    bar() args = a bunch of args

    broquaint out