Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Code factory

by Joost (Canon)
on Jul 08, 2003 at 14:40 UTC ( #272306=note: print w/replies, xml ) Need Help??


in reply to Code factory

Why not use one of the available object oriented persistence modules available on CPAN. Look at this example from Class::DBI:
package Music::DBI; use base 'Class::DBI'; Music::DBI->set_db('Main', 'dbi:mysql', 'username', 'password'); package Artist; use base 'Music::DBI'; Artist->table('artist'); Artist->columns(All => qw/artistid name/); Artist->has_many('cds', 'CD' => artist); # ... my $artist = Artist->retrieve($id);
(This module can actually do a lot more interesting things than that)

A good place to look for more info on object oriented persistence is the POOP comparison website.

-- #!/usr/bin/perl -w use strict;$;= ";Jtunsitr pa;ngo;t1h\$e;r. )p.e(r;ls ;h;a;c.k^e;rs ";$_=$;;do{$..=chop}while(chop);$_=$;;eval$.;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://272306]
help
Chatterbox?
and the universe expands...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2018-05-24 01:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?