Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: OO-style modifiers for 'sub' ?

by dpuu (Chaplain)
on Jan 24, 2003 at 20:58 UTC ( #229704=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
    sub foo # requires interfaces InterfaceA, InterfaceB
    {
    ...
      InterfaceA::validate($self);
      InterfaceB::validate($self);
    }
    
  3. or download this
    sub InterfaceA::validate
    {
    ...
      error unless $candidate->can("fn1"); # implicit ISA
      error unless $candidate->can("fn2");
    }
    
  4. or download this
    sub validate_object
    {
    ...
      my ($self) = @_;
      validate_object($self, map {"Interface$_"} qw/A B D/);
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://229704]
help
Chatterbox?
[james28909]: @choroba yes they do but for some reasom when i try to pipe the output of youtube-dl to ffmpeg, it fails. hence the work around lol
[RonW]: james28909: Interesting trick
[choroba]: The theme is "High-end Perl", so both my talks are antitheses: "Low-end Perl" and "How to almost win a T-shirt in a programming contest"
[RonW]: I wonder if that's a CMD.exe limitation or a Windows limitation
[james28909]: what i am trying to accomplish is piping the output of ffmpeg to yet another encryption routine using libsodium. and hopefully once that is done i will be able to forward the packets to discord servers
[RonW]: choroba: Please define "high end" and "low end"
[LanX]: choroba: subversive (as usual ;)
[james28909]: i dunno, if i didnt have so little experience in linux i would swap. but it would be to much of a learning curve for me right now.
[choroba]: Low-end is defined as the Perl that generates millions of income
[choroba]: sorry, that's high-end, of coursse

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (16)
As of 2017-05-22 21:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?