Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2018-08-14 13:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (150 votes). Check out past polls.

    Notices?