in reply to Re: Transparently inheriting functions from a parent package
in thread Transparently inheriting functions from a parent package
When mod_perl calls a handler it should be akin to a perl program calling the function "handler" in the referenced package... so I made a simple test case and tried it with parent:
Running t.pl produces:-- t2.pm -- package t2; sub testing2 { print "Testing from t2.pm\n"; } 1; -- t.pm -- package t; use parent t2; sub testing { print "Testing from t.pm\n"; } 1; -- t.pl -- #!/usr/bin/perl use t; t::testing(); t::testing2();
This is the first direction I tried cause it seemed correct but... alas I am missing somethingTesting from t.pm Undefined subroutine &t::testing2 called at ./t.pl line 5.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Transparently inheriting functions from a parent package
by wind (Priest) on Apr 05, 2011 at 00:37 UTC | |
by vaewyn (Novice) on Apr 05, 2011 at 00:48 UTC |