X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FManual%2FQuickStart.pod;h=0c31ac089b0bd1eccdde6fff56fd2bf126a47965;hb=d7d45bdc6577c020f62cfbf6767431a1c41a351f;hp=c58911195ff57aaf4c0569b3fb271c088924da00;hpb=113e8d1660c91919f4521139d61677217b546052;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Manual/QuickStart.pod b/lib/DBIx/Class/Manual/QuickStart.pod index c589111..0c31ac0 100644 --- a/lib/DBIx/Class/Manual/QuickStart.pod +++ b/lib/DBIx/Class/Manual/QuickStart.pod @@ -28,17 +28,17 @@ mentioned earlier, the next command will download and unpack it: Inspect the database: - DBIx-Class/examples/Schema$ echo .dump | sqlite3 db/example.db + DBIx-Class/examples/Schema$ sqlite3 db/example.db .dump You can also use a GUI database browser such as L. -Have a look at the schema classes files in the subdirectory F. The -C class is the entry point for loading the other classes and +Have a look at the schema classes files in the subdirectory F. The +C class is the entry point for loading the other classes and interacting with the database through DBIC and the C classes correspond to the tables in the database. L shows how to write all that Perl code. That is almost never necessary, though. Instead use -L (part of the distribution C) to +L (part of the distribution L) to automatically create schema classes files from an existing database. The chapter L below shows an example invocation. @@ -46,8 +46,8 @@ chapter L below shows an example invocation. A L object represents the database. - use MyDatabase::Main qw(); - my $schema = MyDatabase::Main->connect('dbi:SQLite:db/example.db'); + use MyApp::Schema qw(); + my $schema = MyApp::Schema->connect('dbi:SQLite:db/example.db'); The first four arguments are the same as for L. @@ -114,7 +114,7 @@ Set up a condition. } ); -Iterate over result objects of class C. +Iterate over result objects of class C. L objects represent a row and automatically get accessors for their column names. @@ -175,11 +175,11 @@ From a detail to the root: DBIx-Class/examples/Schema$ perl ./insertdb.pl # delete the schema classes files - DBIx-Class/examples/Schema$ rm -rf MyDatabase/ + DBIx-Class/examples/Schema$ rm -rf MyApp # recreate schema classes files from database file DBIx-Class/examples/Schema$ dbicdump \ - -o dump_directory=. MyDatabase::Main dbi:SQLite:db/example.db + -o dump_directory=. MyApp::Schema dbi:SQLite:db/example.db =head2 Where to go next @@ -192,3 +192,14 @@ L. Continue with L and L. + +=head1 FURTHER QUESTIONS? + +Check the list of L. + +=head1 COPYRIGHT AND LICENSE + +This module is free software L +by the L. You can +redistribute it and/or modify it under the same terms as the +L.