It is possible to make subroutines un-callable from a scope, it just makes the code uglier :-)
package Whatever; { # anything outside this scope can't call this: my $private1 = sub { print "hello"; }; # everybody can call Whatever::foo sub foo { $private1->(); # call private method print " world\n"; } } foo();
In reply to Re^4: Using Exporter module
by Joost
in thread Using Exporter module
by perlCrazy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |