Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Quickly detecting variable writes

by Tanktalus (Canon)
on Jan 05, 2007 at 04:24 UTC ( [id://593066]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     foreach (@kabluther) {
      #...
    ...
      # i.e., your $x was modified
      $_->change_in_x() for @listeners; # sounds like this is something li
    +ke what you want to do.
     }
    
  2. or download this
     foreach (@kabluther) {
       $x += $_->getSkookiness() if $_; # ignore undef arguments
       # or if ref $_; # only count ref's
       # or if ref $_ and $_->can('getSkookiness'); # only count objects t
    +hat have this method
     }
    
  3. or download this
      sub onTick {
        our $x;
    ...
        }
        return $x;
      }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-20 13:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found