Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Mutator chaining considered harmful

by fizbin (Chaplain)
on Dec 29, 2004 at 22:18 UTC ( #418106=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    Checksum myCS;
    myCS.addTo(x).addTo(foo).addTo(barObject);
    cout << myCS;
    
  2. or download this
    cout << "Value is: " << dec << myValue << " (hex: " << hex << myValue 
    +<< ")";
    
  3. or download this
    my $Ifile_format = new What::Ever::Format();
    $Ifile_format->addRecType($XErec)
                 ->addRecType($XFrec)
                 ->addRecType($I7rec)
                 ->addRecType($HMrec);
    
  4. or download this
    --
    @/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/;
    map{y/X_/\n /;print}map{pop@$_}@/for@/
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://418106]
help
Chatterbox?
[shmem]: but the results of both operations are different.
[shmem]: result := the discarded result (what's leftmost of the statement)
[shmem]: push returns the number of elements in @foo, the assignment returns all the elements in the (renewed) @foo
[Lady_Aleena]: Sanity check please? push @line, ref($list_addition ) eq 'ARRAY' ? @$list_addition : $list_addiction; # so I don't have the change existing uses of the sub.
[shmem]: $list_addiction should be $list_addition
Discipulus loose the tozzetto party!
[shmem]: .oO( addition of cookies for addiction to cookies )
[Lady_Aleena]: Other than my typos shmem. 8)
[shmem]: otherwise fine
[Discipulus]: tozzetti & vinsanto

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2017-04-27 11:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (503 votes). Check out past polls.