Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Breadth-first method dispatch

by blokhead (Monsignor)
on Jan 30, 2004 at 20:48 UTC ( [id://325389]=CUFP: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package SUPERB;
    use Carp;
    ...
    }
    
    1;
    
  2. or download this
    use SUPERB;
    
    ...
    B::bar
    C::baz
    Base::baz
    
  3. or download this
    package bfs_dispatch;
    use Carp;
    ...
    }
    
    1;
    
  4. or download this
    ## replace this:
    
    ...
    use bfs_dispatch qw/A B/;
    
    ## methods deleted, lets see if the method dispatcher finds the correc
    +t one!
    
  5. or download this
    __OUTPUT__
    A::foo
    B::bar
    Base::baz
    
  6. or download this
    package C;
    @ISA = qw/A B/;
    sub foo { $_[0]->SUPERB::foo(@_[1..$#_]); }
    sub bar { $_[0]->SUPERB::bar(@_[1..$#_]); }
    sub baz { $_[0]->SUPERB::baz(@_[1..$#_]); }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: CUFP [id://325389]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-03-29 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found