Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the UR CPAN distribution.

Report information
The Basics
Id: 82366
Status: resolved
Priority: 0/
Queue: UR

People
Owner: BRUMMETT [...] cpan.org
Requestors: aroudgar [...] sfu.ca
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Possible Bug in UR-0.38
Date: Wed, 2 Jan 2013 10:44:16 -0800 (PST)
To: bug-UR [...] rt.cpan.org
From: Ata Roudgar <aroudgar [...] sfu.ca>
Hi, I am using perl-v5.8.8. Once I Build test UR-0.38 using # ./Build test 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 did everything to trace this error but I could not. It seems there is some issues related to calling "Foo::SUPER"->can(...). Please help me to prevent this test error. I will highly appreciate that. Cheers, Ata Ata Roudgar Research Computing WestGrid Site IT Services Simon Fraser University Burnaby, British Columbia Canada V5A 1S6 phone: 778 782-8860 fax: 778 782-4242
On Wed Jan 02 13:44:28 2013, aroudgar@sfu.ca wrote: 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? 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 It would also help to see the output generated when running it like this: UR_USED_LIBS=1 UR_USED_MODS=1 perl -I lib t/URT/t/80_command_define_datasource.t Those two environment variables tell the system to print out the contents of @INC and %INC as the program exits. 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,@_);
Subject: Re: [rt.cpan.org #82366] Possible Bug in UR-0.38
Date: Wed, 2 Jan 2013 15:24:46 -0800 (PST)
To: Anthony Brummett via RT <bug-UR [...] rt.cpan.org>
From: Ata Roudgar <aroudgar [...] sfu.ca>
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
Subject: Re: [rt.cpan.org #82366] AutoReply: Possible Bug in UR-0.38
Date: Tue, 8 Jan 2013 14:57:16 -0800 (PST)
To: Bugs in UR via RT <bug-UR [...] rt.cpan.org>
From: Ata Roudgar <aroudgar [...] sfu.ca>
Hi, Just to update you. I updated perl-v5.8.8 to perl-v5.16.2 and the problem disappeared. Thanks, Ata
Customer reports he resolved the problem by upgrading Perl. I was not able to reproduce the problem.