Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Weird coincidence (Score:2, Interesting)

    by nkuitse (193) on 2003.09.17 8:34 (#24267) Homepage Journal
    In my current project I'm using -> notation to do the same sort of thing:
    package Foo;
    sub Foo::Bar { require Foo::Bar; 'Foo::Bar' }
     
    package Whatever;
    use Foo;
    my $bar = Foo->Bar->new;
    I just hand-code the Bar method, but then I don't need multi-level stuff like my $qux = Foo->Bar->Baz->Qux->new, which would be relatively easy with AUTOLOAD.

    What's not a coincidence is the (not very obvious) similarity here to Self [sun.com] and its "paths to objects" idiom/dogma.