Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Private method variations

by adrianh (Chancellor)
on Mar 01, 2004 at 00:42 UTC ( #332744=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://332744]
Approved by TStanley
Front-paged by broquaint
[stevieb]: My GPIO expander chips should arrive tomorrow, but I think I'll throw a shift register against them and see if all six I have will turn at once. Amps are near the breaking point, but I want to know max sustainable V and I output.

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2018-03-22 22:18 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (286 votes). Check out past polls.