test caller code:package Foo; use strict; use warnings; use base 'Exporter'; our $hello = \&hellosub; our @EXPORT_OK = ( '$hello'); sub hellosub { my $h = shift; return $h; } print $hello->("Foo Mod init"),"\n"; 1;
use strict; use warnings; BEGIN { push ( @INC,"."); } use Foo ('$hello'); print $hello->('test'),"\n";
Is a computer language with goto's totally Wirth-less?
In reply to Re^5: Passing value to a Perl module
by NetWallah
in thread Passing value to a Perl module
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |