[jifty-devel] Repository version of Jifty fails tests

Andreas J. Koenig andreas.koenig.7os6VVqR at franz.ak.mind.de
Sun Sep 16 11:00:13 EDT 2007

I just tried to run 'make test' on current Jifty repository (rev.
4117) version. I used bleadperl for that. I installed Jifty::DBI from
the repository too.

I've appended the result, it is not pretty. Can anybody explain what
needs to be done?

    Failed 68/77 test scripts. 1/595 subtests failed.

The outstanding repeating single error is:

Can't use string ("current_user") as a HASH ref while "strict refs" in use at /home/src/perl/repoperls/installed-perls/perl/pa5bbiT/perl-5.8.0 at 31863/lib/site_perl/5.10.0/Class/Accessor.pm line 122.

Indeed, when I set a breakpoint in the debugger and wait until $field
equals "current_user", I can see the stack trace

$ = Class::Accessor::new('Jifty::Model::Metadata', 'current_user', ref(Jifty::CurrentUser)) called from file `blib/lib/Jifty/Model/Metadata.pm' line 86
. = Jifty::Model::Metadata::store('Jifty::Model::Metadata', 'application_db_version', ref(version)) called from file `blib/lib/Jifty/Script/Schema.pm' line 180
. = Jifty::Script::Schema::create_all_tables(ref(Jifty::Script::Schema)) called from file `blib/lib/Jifty/Script/Schema.pm' line 49
. = Jifty::Script::Schema::run(ref(Jifty::Script::Schema)) called from file `blib/lib/Jifty/Test.pm' line 245
. = Jifty::Test::setup_test_database('Jifty::Test') called from file `blib/lib/Jifty/Test.pm' line 190
. = Jifty::Test::setup('Jifty::Test', ref(ARRAY)) called from file `blib/lib/Jifty/Test.pm' line 117
. = Jifty::Test::import_extra('Jifty::Test', ref(ARRAY)) called from file `/home/src/perl/repoperls/installed-perls/perl/pa5bbiT/perl-5.8.0 at 31863/lib/5.10.0/Test/Builder/Module.pm' line 93
$ = Test::Builder::Module::import(undef) called from file `(eval 423)[/home/src/perl/repoperls/installed-perls/perl/pa5bbiT/perl-5.8.0 at 31863/lib/5.10.0/Test/More.pm:673]' line 2
$ = main::BEGIN() called from file `blib/lib/Jifty/Test.pm' line 2
$ = eval {...} called from file `blib/lib/Jifty/Test.pm' line 2
. = eval 'package main;
use Jifty::Test @imports;' called from file `/home/src/perl/repoperls/installed-perls/perl/pa5bbiT/perl-5.8.0 at 31863/lib/5.10.0/Test/More.pm' line 673
. = Test::More::use_ok('Jifty::Test') called from file `t/00-load.t' line 6

So I change Metadata.pm line 86 like so:

-     $self = $self->new( current_user => Jifty::CurrentUser->superuser )
+     $self = $self->new( {current_user => Jifty::CurrentUser->superuser} )

But I still get  a large amount of

Can't call method "is_bootstrap_user" on an undefined value at /home/src/www/jifty/WC/jifty/SVN.ro/blib/lib/Jifty/Record.pm line 418.

and the 'current_user' bug is still triggered frequently.

So what's up?

More information about the jifty-devel mailing list