Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: OO-style modifiers for 'sub' ?

by adrianh (Chancellor)
on Jan 26, 2003 at 23:53 UTC ( #230078=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub foo
    {
     my ($self) = @_;
     croak "..." unless ref($self) && $self->isa("AnInterface")
    }
    
  2. or download this
    use base qw(AnInterface AnotherInterface YetAnotherInterface);
    
    ...
        my $self = shift;
        ... code ...
    };
    
  3. or download this
    sub foo # requires interfaces InterfaceA, InterfaceB
    {
    ...
     InterfaceA::validate($self);
     InterfaceB::validate($self);
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2014-07-12 15:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (240 votes), past polls