X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=examples%2FSchema%2Ftestdb.pl;h=a65db0fdf332c9fb9c76d16ec5fc8ddcaa995f24;hb=a8b66abc9cf90221ebcd9be535eda47f6b37a6f8;hp=b31773d513b94e145ece8a4204f6ddea7d5493ee;hpb=557657cd3455b495ba4439b8b045060051081abb;p=dbsrgits%2FDBIx-Class.git diff --git a/examples/Schema/testdb.pl b/examples/Schema/testdb.pl index b31773d..a65db0f 100644 --- a/examples/Schema/testdb.pl +++ b/examples/Schema/testdb.pl @@ -1,8 +1,10 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl -use MyDatabase::Main; +use warnings; use strict; +use MyDatabase::Main; + my $schema = MyDatabase::Main->connect('dbi:SQLite:db/example.db'); # for other DSNs, e.g. MySql, see the perldoc for the relevant dbd # driver, e.g perldoc L. @@ -26,7 +28,6 @@ sub get_tracks_by_cd { }, { join => [qw/ cd /], - prefetch => [qw/ cd /] } ); while (my $track = $rs->next) { @@ -54,7 +55,6 @@ sub get_tracks_by_artist { print "\n"; } - sub get_cd_by_track { my $tracktitle = shift; print "get_cd_by_track($tracktitle):\n"; @@ -79,7 +79,6 @@ sub get_cds_by_artist { }, { join => [qw/ artist /], - prefetch => [qw/ artist /] } ); while (my $cd = $rs->next) { @@ -88,8 +87,6 @@ sub get_cds_by_artist { print "\n"; } - - sub get_artist_by_track { my $tracktitle = shift; print "get_artist_by_track($tracktitle):\n"; @@ -107,7 +104,6 @@ sub get_artist_by_track { print $artist->name . "\n\n"; } - sub get_artist_by_cd { my $cdtitle = shift; print "get_artist_by_cd($cdtitle):\n";