Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Mutator chaining considered harmful

by Aristotle (Chancellor)
on Dec 28, 2004 at 23:09 UTC ( #417872=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $frobnitzer->set_frob( 42 )
               ->set_flub( 712 )
               ->set_name( 'veeblefetzer' );
    
  2. or download this
    my $label = $button->border( 20 )->label;
    
  3. or download this
    $window->title( 'foo' )->border( 20 );
    
    # semantically very different from:
    
    $window->child->border( 20 );
    
  4. or download this
    my $label_formatting = $window->title( 'foo' )
                                  ->border( 20 )
                                  ->child->border( 20 )
                                  ->child->font_style;
    
  5. or download this
    $window->title( 'foo' );
    $window->border( 20 );
    ...
    $button->border( 20 );
    
    my $label_formatting = $button->child->font_style;
    
  6. or download this
    $window->set( 
        title => 'foo',
        border => 20,
    );
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://417872]
Approved by VSarkiss
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2015-03-04 13:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (111 votes), past polls