- or download this
package Foo;
...
# we can use lexically scoped subs
$self->$_private();
};
- or download this
package Foo;
...
my $self = shift;
$self->Foo::private::method { ... };
};
- or download this
sub Foo::MY::method { ... };
...
my $self = shift;
$self->MY::method();
};
- or download this
package MY;
...
my $method = caller() . "::$AUTOLOAD";
$self->$method(@_);
};
- or download this
sub MY::method { ... };
- or download this
sub MyLongPackageName::MY::method { ... };
- or download this
package MY;
use strict;
...
FILTER_ONLY code => sub { s/(\w+::)*MY::/${Imported_from}::MY::/gs };
1;
- or download this
package Foo;
use MY;
...
sub MY::greet_world {
print "A new Bar has entered the world\n";
};