in reply to Re^2: symbolic reference + inheritance
in thread symbolic reference + inheritance
>perl -wMstrict -le "package base; sub func { print q{in }, __PACKAGE__, qq{ via $_[0] got $_[1]}; } package derived; our @ISA = qw(base); package main; my $pack = 'derived'; $pack ->func(42); 'derived'->func(42); my $foo = 'fu'; $pack->can(qq{${foo}nc})->(42); no strict 'refs'; &{ $pack->${\qq{${foo}nc}} }(42); $pack->${\qq{${foo}nc}}->(42); " in base via derived got 42 in base via derived got 42 Use of uninitialized value in concatenation (.) or string at ... in base via 42 got Use of uninitialized value in concatenation (.) or string at ... in base via derived got Undefined subroutine &main::1 called at -e line 1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: symbolic reference + inheritance
by merlyn (Sage) on Sep 26, 2009 at 16:06 UTC | |
|
Re^4: symbolic reference + inheritance
by almut (Canon) on Sep 26, 2009 at 10:03 UTC | |
by AnomalousMonk (Archbishop) on Sep 26, 2009 at 12:30 UTC | |
by ikegami (Patriarch) on Sep 26, 2009 at 12:57 UTC |