Discussion:
unknown
1970-01-01 00:00:00 UTC
Permalink
Perhaps I spoke too soon.

As long as I do not try to do anything, things seem to work, that is,
there are no segfaults. However, as soon as I try to use what 'use
Jifty::Everything' and 'Jifty->new' are doing for me, the threading
causes issues.

So I will try to just create a Jifty::DBI::Handle and work that way.
Which leads me to my next question. :)

I've got the following code:

#!/usr/bin/env perl

use Jifty::DBI::Handle;
use lib '/home/mzagrabe/code/git/NA/lib';
use NA::Model::StagedInfrastructure;

my $handle = Jifty::DBI::Handle->new();
$handle->connect(
driver => 'Pg',
database => 'na',
host => 'localhost',
user => '',
password => ''
);

my $u = NA::Model::StagedInfrastructure->new( handle => $handle );

which, when ran, yields the following error:

Can't locate NA/Record.pm in @INC (@INC contains:
/home/mzagrabe/code/git/NA/lib /etc/perl /usr/local/lib/perl/5.10.1
/usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at
/home/mzagrabe/code/git/NA/lib/NA/Model/StagedInfrastructure.pm line
26.
BEGIN failed--compilation aborted at
/home/mzagrabe/code/git/NA/lib/NA/Model/StagedInfrastructure.pm line
26.
Compilation failed in require at ./na-test-jifty_dbi_handle line 5.
BEGIN failed--compilation aborted at ./na-test-jifty_dbi_handle line 5.

So, I am missing some of the automagic that I took for granted.
However, I need to keep the threads, and I would like to utilize the
Jifty ORM as much as possible. Is there a way to hand massage the
above script to get things like:

NA::CurrentUser
NA::Record

back?

Thanks,

-matt

Loading...