Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Strategy Handles

by jdporter (Canon)
on Jan 03, 2006 at 21:47 UTC ( #520738=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package Output_Strategy::HTML;
    package Output_Strategy::CSV;
    ...
    $output_strategy->render(@data);
    $output_strategy->postamble;
    # whatever
    
  2. or download this
    package Foo;
    use base 'Output_Strategy'; # this is a 'strategy handle class'
    ...
    @Output_Strategy::ISA = ( $opt{'html'}
      ? 'Output_Strategy::HTML'
      : 'Output_Strategy::CSV' );
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (15)
As of 2015-07-31 09:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls