Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: module w/ object-oriented and functional interfaces: best practices?

by BrowserUk (Pope)
on Sep 21, 2012 at 20:22 UTC ( #994988=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    ...
        my( avg, $stddev ) = avgNstddev( $bigStruct->{something}{something
    +else} ); ## hash expression yields an array ref.
    ...
    
  2. or download this
    ...
        my $stats = Stats:Mod->new;
    ...
        my $stddev = $stats->stddev;
        $stats->empty;
    ...
    
  3. or download this
    for my $something ( keys %bigstruct ) {
        for my $somethingelse ( keys %{ $bigstruct->{ $something } } ) {
             ...
        }
    }
    
  4. or download this
    my $stats = Stats::Module->new( $bigstruct->{ $something }{ $something
    +else } );
    my( $avg = ( $stats->average, $stats->stddev );
    $stats->done;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2014-12-28 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (183 votes), past polls