Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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?
[Corion]: Oh - jwz gives us interesting insight in cloud hosting. I'm amazed how many people suggest he rework his setup into AWS, even though that brings a lot of rearchitecting just to make it wo
[Corion]: ... work
[erix]: interesting...
erix especially likes the "alot is not a word" muttering

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2017-06-24 07:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (557 votes). Check out past polls.