Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Mutator chaining considered harmful

by Aristotle (Chancellor)
on Dec 28, 2004 at 23:09 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-23 10:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found