Advertisement
Guest User

Untitled

a guest
Sep 25th, 2012
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.51 KB | None | 0 0
  1. #!/usr/bin/env perl
  2.  
  3. use Modern::Perl;
  4. use DBIx::Class::Schema::Loader 'make_schema_at';
  5.  
  6. my $DEBUG = @ARGV and $ARGV[0] =~ /^\-[\-]*v/;
  7.  
  8. say $DBIx::Class::Schema::Loader::VERSION if $DEBUG;
  9. my @dsn = 'dbi:SQLite:dbname=test.db';
  10.  
  11. my $options = {
  12.   debug => $DEBUG,
  13.   dump_directory => 'lib',
  14.   components => [qw/ InflateColumn::DateTime /],
  15.   generate_pod => 0,
  16. };
  17.  
  18. make_schema_at(Schema => $options, \@dsn);
  19.  
  20. =head1 NAME
  21.  
  22. generate_dbic_schema
  23.  
  24. =head1 USAGE
  25.  
  26. perl generate_dbic_schema
  27.  
  28. =cut
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement