Hi Anthony,
Show quoted text>> command I receive the following error for
>> t/URT/t/80_command_define_datasource.t
>>
>> Can't use string ("0") as a subroutine ref while "strict refs" in use
>> at /usr/local/src/genome-music-0.4.1/dependencies/UR-0.38/lib/UR/Namespace/Command/Define/Datasource/Sqlite.pm line 44.
>> # Looks like you planned 57 tests but ran 7.
>> # Looks like your test
>> exited with 255 just after 7.
>
> I'm not able to reproduce the error here. Is this is only test that is
failing?
Show quoted text>
Yes, that is the only one.
Show quoted text> Does the test pass if you run it by itself, directly? Running it like
> this from /usr/local/src/genome-music-0.4.1/dependencies/UR-0.38/
> perl -I lib t/URT/t/80_command_define_datasource.t
# perl -I lib t/URT/t/80_command_define_datasource.t
ok 1 - use UR::Namespace::Command::Define::Datasource;
ok 2 - use UR::Namespace::Command::Define::Datasource::Sqlite;
ok 3 - use UR::Namespace::Command::Define::Datasource::Oracle;
ok 4 - use UR::Namespace::Command::Define::Datasource::Mysql;
ok 5 - use UR::Namespace::Command::Define::Datasource::Pg;
ok 6 - Resolving parameters for define datasource, delegate class
UR::Namespace::Command::Define::Datasource::Sqlite
ok 7 - Created command obj for defining SQLite DS
Can't use string ("0") as a subroutine ref while "strict refs" in use at
/usr/local/src/genome-music-0.4.1/dependencies/UR-0.38/lib/UR/Namespace/Command/Define/Datasource/Sqlite.pm
line 44.
# Looks like you planned 57 tests but ran 7.
# Looks like your test exited with 255 just after 7.
# UR_USED_LIBS=1 UR_USED_MODS=1 perl -I lib t/URT/t/80_command_define_datasource.t
ok 1 - use UR::Namespace::Command::Define::Datasource;
ok 2 - use UR::Namespace::Command::Define::Datasource::Sqlite;
ok 3 - use UR::Namespace::Command::Define::Datasource::Oracle;
ok 4 - use UR::Namespace::Command::Define::Datasource::Mysql;
ok 5 - use UR::Namespace::Command::Define::Datasource::Pg;
ok 6 - Resolving parameters for define datasource, delegate class
UR::Namespace::Command::Define::Datasource::Sqlite
ok 7 - Created command obj for defining SQLite DS
Can't use string ("0") as a subroutine ref while "strict refs" in use at
/usr/local/src/genome-music-0.4.1/dependencies/UR-0.38/lib/UR/Namespace/Command/Define/Datasource/Sqlite.pm
line 44.
# Looks like you planned 57 tests but ran 7.
# Looks like your test exited with 255 just after 7.
Used library include paths (@INC):
/usr/local/src/genome-music-0.4.1/dependencies/UR-0.38/t
/usr/local/src/genome-music-0.4.1/dependencies/UR-0.38/lib
/usr/local/src/genome-music-0.4.1/dependencies/UR-0.38/lib
/usr/local/perl/lib/perl5/5.8.8
/usr/local/perl/lib/perl5/x86_64-linux-thread-multi
/usr/local/src/genome-music-0.4.1/dependencies/UR-0.38/t
/usr/local/perl/lib/perl5
/usr/local/perl/lib64/perl5/5.8.8/x86_64-linux-thread-multi
/usr/local/perl/lib64/perl5/5.8.8
/usr/local/perl/lib64/perl5
/usr/local/perl/lib/perl5/site_perl/5.8.8
/usr/local/perl/lib/perl5/site_perl
/usr/local/perl/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi
/usr/local/perl/lib64/perl5/site_perl/5.8.8
/usr/local/perl/lib64/perl5/site_perl
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl
/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8
/usr/lib/perl5/vendor_perl
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/5.8.8
/usr/local/src/genome-music-0.4.1/dependencies/UR-0.38
Used modules and paths (%INC):
AutoLoader.pm
Carp.pm
Class/AutoloadCAN.pm
Class/Autouse.pm
Class/Autouse_1_99_02.pm
Class/Autouse_1_99_04.pm
Clone/PP.pm
Command.pm
Command/V1.pm
Config.pm
Config_heavy.pl
Cwd.pm
DBD/Pg.pm
DBD/mysql.pm
DBI.pm
Data/Dumper.pm
Data/UUID.pm
Date/Format.pm
Digest/MD5.pm
Digest/base.pm
DynaLoader.pm
Env.pm
Exporter.pm
Exporter/Heavy.pm
Fcntl.pm
File/Basename.pm
File/Find.pm
File/Glob.pm
File/Spec.pm
File/Spec/Unix.pm
FindBin.pm
FreezeThaw.pm
Getopt/Long.pm
IO.pm
IO/File.pm
IO/Handle.pm
IO/Seekable.pm
Lingua/EN/Inflect.pm
List/Util.pm
PerlIO.pm
Scalar/Util.pm
SelectSaver.pm
Sub/Install.pm
Sub/Name.pm
Symbol.pm
Sys/Hostname.pm
Term/ANSIColor.pm
Test/Builder.pm
Test/Builder/Module.pm
Test/More.pm
Text/Tabs.pm
Text/Wrap.pm
Tie/Array.pm
Time/HiRes.pm
Time/Local.pm
Time/Zone.pm
UNIVERSAL.pm
UR.pm
UR/BoolExpr.pm
UR/BoolExpr/Template.pm
UR/BoolExpr/Template/And.pm
UR/BoolExpr/Template/Composite.pm
UR/BoolExpr/Template/Or.pm
UR/BoolExpr/Template/PropertyComparison.pm
UR/BoolExpr/Template/PropertyComparison/Equals.pm
UR/BoolExpr/Template/PropertyComparison/In.pm
UR/BoolExpr/Template/PropertyComparison/LessThan.pm
UR/BoolExpr/Template/PropertyComparison/Like.pm
UR/BoolExpr/Util.pm
UR/Change.pm
UR/Context.pm
UR/Context/DefaultRoot.pm
UR/Context/ImportIterator.pm
UR/Context/LoadingIterator.pm
UR/Context/ObjectFabricator.pm
UR/Context/Process.pm
UR/Context/Root.pm
UR/DBI.pm
UR/DBI/Report.pm
UR/DeletedRef.pm
UR/Env/UR_USED_LIBS.pm
UR/Env/UR_USED_MODS.pm
UR/Exit.pm
UR/ModuleBase.pm
UR/ModuleConfig.pm
UR/ModuleLoader.pm
UR/Namespace.pm
UR/Namespace/Command.pm
UR/Namespace/Command/Base.pm
UR/Namespace/Command/Define.pm
UR/Namespace/Command/Define/Datasource.pm
UR/Namespace/Command/Define/Datasource/Mysql.pm
UR/Namespace/Command/Define/Datasource/Oracle.pm
UR/Namespace/Command/Define/Datasource/Pg.pm
UR/Namespace/Command/Define/Datasource/Rdbms.pm
UR/Namespace/Command/Define/Datasource/RdbmsWithAuth.pm
UR/Namespace/Command/Define/Datasource/Sqlite.pm
UR/Object.pm
UR/Object/Ghost.pm
UR/Object/Index.pm
UR/Object/Iterator.pm
UR/Object/Join.pm
UR/Object/Property.pm
UR/Object/Tag.pm
UR/Object/Type.pm
UR/Object/Type/AccessorWriter.pm
UR/Object/Type/Initializer.pm
UR/Object/Type/InternalAPI.pm
UR/Object/Type/ModuleWriter.pm
UR/Object/View.pm
UR/ObjectDeprecated.pm
UR/Observer.pm
UR/Singleton.pm
UR/Util.pm
UR/Value/Iterator.pm
URT.pm
XSLoader.pm
base.pm
bytes.pm
constant.pm
integer.pm
lib.pm
overload.pm
re.pm
strict.pm
utf8.pm
vars.pm
version.pm
version/vxs.pm
warnings.pm
warnings/register.pm
Please note that we have
# echo $PERL5LIB
/usr/local/perl/lib/perl5:/usr/local/perl/lib64/perl5:/usr/local/perl/lib/perl5/site_perl:/usr/local/perl/lib64/perl5/site_perl
Show quoted text> Finally, if you are able to apply this small patch to
> lib/UR/Namespace/Command/Define/Datasource/Sqlite.pm, it will print out more useful information about the
> problem:
>
> --- a/lib/UR/Namespace/Command/Define/Datasource/Sqlite.pm
> +++ b/lib/UR/Namespace/Command/Define/Datasource/Sqlite.pm
> @@ -36,6 +36,10 @@ sub server {
> my $self = shift;
>
> my $super_server = $self->super_can('server');
> + unless ($super_server) {
> + Carp::confess(qq(Can't locate object method "server" via parents of package ").ref($self)
> + . qq(". Inheritance is: ).join(', ',$self->inheritance));
> + }
> if (@_) {
> # unusual case, setting the server
> return $super_server($self,@_);
In order to be able apply this patch successfully I needed to replace:
--- a/lib/UR/Namespace/Command/Define/Datasource/Sqlite.pm
to
--- lib/UR/Namespace/Command/Define/Datasource/Sqlite.pm
Then I ran:
# perl -I lib t/URT/t/80_command_define_datasource.t
ok 1 - use UR::Namespace::Command::Define::Datasource;
ok 2 - use UR::Namespace::Command::Define::Datasource::Sqlite;
ok 3 - use UR::Namespace::Command::Define::Datasource::Oracle;
ok 4 - use UR::Namespace::Command::Define::Datasource::Mysql;
ok 5 - use UR::Namespace::Command::Define::Datasource::Pg;
ok 6 - Resolving parameters for define datasource, delegate class
UR::Namespace::Command::Define::Datasource::Sqlite
ok 7 - Created command obj for defining SQLite DS
Can't locate object method "server" via parents of package
"UR::Namespace::Command::Define::Datasource::Sqlite". Inheritance is:
UR::Namespace::Command::Define::Datasource::Rdbms,
UR::Namespace::Command::Define::Datasource, UR::Namespace::Command::Base,
Command::V1, Command, UR::Object, UR::ModuleBase at
/usr/local/src/genome-music-0.4.1/dependencies/UR-0.38/lib/UR/Namespace/Command/Define/Datasource/Sqlite.pm
line 39.
UR::Namespace::Command::Define::Datasource::Sqlite::server('UR::Namespace::Command::Define::Datasource::Sqlite=HASH(0x1d5...')
called at
/usr/local/src/genome-music-0.4.1/dependencies/UR-0.38/lib/UR/Object.pm
line 157
UR::Object::__errors__('UR::Namespace::Command::Define::Datasource::Sqlite=HASH(0x1d5...')
called at
/usr/local/src/genome-music-0.4.1/dependencies/UR-0.38/lib/Command/V1.pm
line 120
Command::V1::execute('UR::Namespace::Command::Define::Datasource::Sqlite=HASH(0x1d5...')
called at t/URT/t/80_command_define_datasource.t line 62
# Looks like you planned 57 tests but ran 7.
# Looks like your test exited with 255 just after 7.
Thank you for your time,
Cheers,
Ata