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

Re: coderef to an object method

by ambrus (Abbot)
on Jul 21, 2004 at 09:04 UTC ( [id://376182]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Math::BigRat; $m = "new"; $a = Math::BigRat->$m(5); $b = Math::Big
    +Rat->$m(8); for $m (qw(badd bsub bmul bdiv)) { $x = $a->copy->$m($b);
    + print "$a $m $b = $x\n" }
    
  2. or download this
    use Math::BigRat; $m = "new"; $a = Math::BigRat->$m(5); $b = Math::Big
    +Rat->$m(8); for $m (qw(add sub mul div)) { $x = $a->copy->${\("b".$m)
    +}($b); print "$a $m $b = $x\n" }
    
  3. or download this
    package ParentClass;
    # [...]
    ...
            # [...]
    }
    # [...]
    
  4. or download this
    sub UNIVERSAL::method { 
            my($self, $name, @rest) = @_;
    ...
                    data       => $self->method("gotdata"),
                    connect    => $self->method("connected"),
    # [...]
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-04-25 02:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found