Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.57 KB | None | 0 0
  1. use Mine::DBIx::Schema;
  2. use Data::Dumper;
  3.  
  4. my $dsn = 'DBI:mysql:database=products;host=localhost';
  5. my $user = 'user';
  6. my $pass = 'pass';
  7. my $schema = Mine::DBIx::Schema->connect($dsn, $user, $pass);
  8.  
  9. my $product_rs = $schema->resultset('Product')->search( { product_id => 7620597 } );
  10. warn Dumper($product_rs);
  11.  
  12.  
  13. ## Gets me this error:
  14. #Use of uninitialized value in scalar assignment at
  15. #   /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/List/MoreUtils.pm line 24.
  16. #DBIx::Class::Schema::resultset(): Can't find source for Product at test_dbix.pl line 12
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement