Hello,

What's the right way to design this library ?

my $lib = new MyLib;
$lib->init_cd_burner;
my $schema = $lib->get_schema;
my $rs = $schema->resultset('CD')->search( $search_params );
while( my $cd = $rs->next )
{
  $cd->set_cd_burner( $lib->get_cd_burner );
  $cd->burn_this_cd;
}

or else :

my $lib = new MyLib;
$lib->init_cd_burner;
my $cds = $lib->search_cds( $search_params );
while( my $cd = $cds->next )
{
  $cd->burn_this_cd;
}

or else :

my $lib = new MyLib;
$lib->init_cd_burner;
my $schema = $lib->get_schema;
my $rs = $schema->resultset('CD')->search( $search_params );
while( my $cd = $rs->next )
{
  $lib->burn_this_cd( $cd );
}

anything else ?                                           
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to