
alexander.hartmaier at t-systems
Apr 30, 2012, 2:11 AM
Post #9 of 9
(397 views)
Permalink
|
Note that you also can load your app to use its config file loading capabilities and access MyApp->model('DB')->resultset('Foo'). BR Alex Am 2012-04-27 15:25, schrieb Glen Diener: > I'm new to Catalyst and have nearly completed the development of my first Catalyst web site. I'm needing to implement scripts to do some off-line database processing and would like to use the DBIx model created and implemented for the Catalyst site. I'm sure this must be possible, but, I've not been successful. > > This is what I have so far: > > use strict; > use warnings; > use Data::Dumper; > use FindBin qw($Bin); > use lib "$Bin/../lib"; > use DealerDemoSite::Schema::DemoDB; > > > my $connect_info_args = [.{ > dsn => 'dbi:Pg:dbname=dib', > user => '...', > password => '...', > AutoCommit => q{1}, > }]; > > my $schema = DealerDemoSite::Schema::DemoDB->connect($connect_info_args); > print Dumper($schema); > > my $demo = $schema->resultset('DemoDB::DddDemo')->find({demoid => 30024}); > > > I'm getting the following error message: > > DBIx::Class::Schema::resultset(): Can't find source for DemoDB::DddDemo at ./maint.pl line 28 > > Within the Catalyst application I able to use the following successfully: > > my $demo = $c->model('DemoDB::ddddemo')->find($demoid); > > > Thanks for your help. > - Glen > > _______________________________________________ > List: Catalyst [at] lists > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/catalyst [at] lists/ > Dev site: http://dev.catalyst.perl.org/ *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"* T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien Handelsgericht Wien, FN 79340b *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"* Notice: This e-mail contains information that is confidential and may be privileged. If you are not the intended recipient, please notify the sender and then delete this e-mail immediately. *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"* _______________________________________________ List: Catalyst [at] lists Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst [at] lists/ Dev site: http://dev.catalyst.perl.org/
|