On 12/11/06, Jesse Vincent <[EMAIL PROTECTED]> wrote:
> Actually I've tried this piece of code before taking the harder
> approach. But I got the following error:
>
>    Can't locate Qooqle/Record.pm in @INC (@INC contains: lib
> E:/Perl/lib E:/Perl/site/lib .) at lib/Qooqle/Model/QQUser.pm line 25.
>    BEGIN failed--compilation aborted at lib/Qooqle/Model/QQUser.pm
> line 25. Compilation failed in require at bin/qqimport.pl line 15.
>    BEGIN failed--compilation aborted at bin/qqimport.pl line 15.
>

Oh! I bet the problem is that Jifty->new() isn't in a BEGIN {} block.
Try that?


Indeed you are correct!

Putting C<Jifty->new()> into BEGIN {} works for me. So the boilerplate
actually look like this:

  use Jifty::Everything;
  BEGIN { Jifty->new; }

  use Qooqle::Model::QQUser;
  use Qooqle::Model::Session;
  use Qooqle::Model::Message;

Hmm, incredibly clean. :)

Maybe we should add this bit to Jifty::Manual::Models?

Cheers,
Agent
_______________________________________________
jifty-devel mailing list
[email protected]
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel

Reply via email to