Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: Maybe database tables aren't such great "objects," after all ...

by Your Mother (Archbishop)
on Mar 26, 2011 at 05:16 UTC ( [id://895638]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub checkout_total {
       +shift->items->get_column("cost")->sum;
    }
    
  2. or download this
    # Inside My::Schema::Cart or an auxillary class only
    # loaded into the space on demand.
    ...
       my $sum = $cost_col->sum;
       return $sum;
    }
    
  3. or download this
    # This is not exactly how it would be set up for real.
    # Load order and @INC stuff requires some tweaks to
    ...
        item:4 -->  $ 6.72
        item:5 -->  $15.50
        item:6 -->  $63.42
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-19 18:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found