Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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?
[LanX]: met a guy from Aberdeen durin holidays, liked Scotsish accent a lot ... very phonetic
[LanX]: ... understood everything after mentally write down what he said.
[choroba]: Trainspotting?
[choroba]: Ouch, trailing commas in JSON :-(
[LanX]: ... though there seems to exist a taxation for the letter 't' in Northern Bri''ain ;-)
[LanX]: never seen trainspotting in OV ... :(
[karlgoethebier]: LanX

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2018-02-19 10:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (261 votes). Check out past polls.

    Notices?