Skip Menu |
 

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 118808
Status: open
Priority: 0/
Queue: Moose

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc: perler [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.1902-TRIAL
Fixed in: (no value)



CC: perler [...] cpan.org
Subject: Moose 2.1902-TRIAL breaks DBIx-Class-Graph-1.05
Download (untitled) / with headers
text/plain 7.1k
If Moose-2.1902-TRIAL is installed, then the DBIx-Class-Graph-1.05 test suite fails: Output from './Build test': Could not generate inline handles for _graph->("" because : Failed to compile source: syntax error at (eval 210) line 21, near """( " source: #line 1 "inline delegation in DBIx::Class::ResultSet::Graph for _graph->("" (attribute declared in lib/DBIx/Class/Graph/Role/ResultSet.pm at line 22)" sub { my $self = shift; my $proxy = $self->_graph; if ( !defined $proxy ) { die Module::Runtime::use_module("Moose::Exception::AttributeValueIsNotDefined")->new(method => $self->meta->find_method_by_name("(\"\""), instance => $self, attribute => $self->meta->find_attribute_by_name("_graph"), ); } elsif ( ref $proxy && !Scalar::Util::blessed($proxy) ) { die Module::Runtime::use_module("Moose::Exception::AttributeValueIsNotAnObject")->new(method => $self->meta->find_method_by_name("(\"\""), instance => $self, attribute => $self->meta->find_attribute_by_name("_graph"), given_value => $proxy, ); } return $proxy->(""( @_ ); } at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Class/MOP/Method/Generated.pm line 56. at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Moose/Meta/Method/Delegation.pm line 148 Moose::Meta::Method::Delegation::catch {...} ('Failed to compile source: syntax error at (eval 210) line 21, near """( "^J^J^Jsource:^J#line 1 "inline delegation in DBIx::Class::ResultSet::Graph for _graph->("" (attribute declared in lib/DBIx/Class/Graph/Role/ResultSet.pm at line 22)"^Jsub {^J my $self = shift;^J^J my $proxy = $self->_graph;^J if ( !defined $proxy ) {^J die Module::Runtime::use_module("Moose::Exception::AttributeValueIsNotDefined")->new(method => $self->meta->find_method_by_name("(\"\""),^Jinstance => $self,^Jattribute => $self->meta->find_attribute_by_name("_graph"),^J);^J }^J elsif ( ref $proxy && !Scalar::Util::blessed($proxy) ) {^J die Module::Runtime::use_module("Moose::Exception::AttributeValueIsNotAnObject")->new(method => $self->meta->find_method_by_name("(\"\""),^Jinstance => $self,^Jattribute => $self->meta->find_attribute_by_name("_graph"),^Jgiven_value => $proxy,^J);^J }^J return $proxy->(""( @_ );^J}^J at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Class/MOP/Method/Generated.pm line 56.^J') called at /opt/perl-5.18.4/lib/site_perl/5.18.4/Try/Tiny.pm line 124 Try::Tiny::try('CODE(0x3a5ca90)', 'Try::Tiny::Catch=REF(0x3a45720)') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Moose/Meta/Method/Delegation.pm line 154 Moose::Meta::Method::Delegation::_generate_inline_method('Moose::Meta::Method::Delegation=HASH(0x2580438)') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Moose/Meta/Method/Delegation.pm line 82 Moose::Meta::Method::Delegation::_initialize_body('Moose::Meta::Method::Delegation=HASH(0x2580438)') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Moose/Meta/Method/Delegation.pm line 54 Moose::Meta::Method::Delegation::new('Moose::Meta::Method::Delegation', 'name', '(""', 'package_name', 'DBIx::Class::ResultSet::Graph', 'attribute', 'Moose::Meta::Attribute=HASH(0x3a128c0)', 'delegate_to_method', '(""', 'curried_arguments', 'ARRAY(0x2859098)') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Moose/Meta/Attribute.pm line 1255 Moose::Meta::Attribute::_make_delegation_method('Moose::Meta::Attribute=HASH(0x3a128c0)', '(""', '(""') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Moose/Meta/Attribute.pm line 1122 Moose::Meta::Attribute::install_delegation('Moose::Meta::Attribute=HASH(0x3a128c0)') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Moose/Meta/Attribute.pm line 1015 Moose::Meta::Attribute::install_accessors('Moose::Meta::Attribute=HASH(0x3a128c0)') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Class/MOP/Class.pm line 899 Class::MOP::Class::try {...} at /opt/perl-5.18.4/lib/site_perl/5.18.4/Try/Tiny.pm line 103 eval {...} at /opt/perl-5.18.4/lib/site_perl/5.18.4/Try/Tiny.pm line 94 Try::Tiny::try('CODE(0x3a12008)', 'Try::Tiny::Catch=REF(0x2b1b738)') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Class/MOP/Class.pm line 904 Class::MOP::Class::_post_add_attribute('Moose::Meta::Class=HASH(0x1d568d8)', 'Moose::Meta::Attribute=HASH(0x3a128c0)') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Class/MOP/Mixin/HasAttributes.pm line 39 Class::MOP::Mixin::HasAttributes::add_attribute('Moose::Meta::Class=HASH(0x1d568d8)', 'Moose::Meta::Attribute=HASH(0x3a128c0)') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Moose/Meta/Class.pm line 577 Moose::Meta::Class::add_attribute('Moose::Meta::Class=HASH(0x1d568d8)', 'Moose::Meta::Attribute=HASH(0x3a128c0)') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Moose/Meta/Role/Application/ToClass.pm line 126 Moose::Meta::Role::Application::ToClass::apply_attributes('Moose::Meta::Role::Application::ToClass=HASH(0x3a29400)', 'Moose::Meta::Role=HASH(0x3a0fab8)', 'Moose::Meta::Class=HASH(0x1d568d8)') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Moose/Meta/Role/Application.pm line 59 Moose::Meta::Role::Application::apply('Moose::Meta::Role::Application::ToClass=HASH(0x3a29400)', 'Moose::Meta::Role=HASH(0x3a0fab8)', 'Moose::Meta::Class=HASH(0x1d568d8)') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Moose/Meta/Role/Application/ToClass.pm line 31 Moose::Meta::Role::Application::ToClass::apply('Moose::Meta::Role::Application::ToClass=HASH(0x3a29400)', 'Moose::Meta::Role=HASH(0x3a0fab8)', 'Moose::Meta::Class=HASH(0x1d568d8)', 'HASH(0x28e3388)') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Moose/Meta/Role.pm line 472 Moose::Meta::Role::apply('Moose::Meta::Role=HASH(0x3a0fab8)', 'Moose::Meta::Class=HASH(0x1d568d8)') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Moose/Util.pm line 172 Moose::Util::_apply_all_roles('Moose::Meta::Class=HASH(0x1d568d8)', undef, 'DBIx::Class::Graph::Role::ResultSet') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Moose/Util.pm line 114 Moose::Util::apply_all_roles('Moose::Meta::Class=HASH(0x1d568d8)', 'DBIx::Class::Graph::Role::ResultSet') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Moose.pm line 57 Moose::with('Moose::Meta::Class=HASH(0x1d568d8)', 'DBIx::Class::Graph::Role::ResultSet') called at /home/cpansand/.cpan/build/2016111706/Moose-2.1902-2/blib/lib/Moose/Exporter.pm line 419 Moose::with('DBIx::Class::Graph::Role::ResultSet') called at lib/DBIx/Class/ResultSet/Graph.pm line 19 require DBIx/Class/ResultSet/Graph.pm at -e line 1 Compilation failed in require at -e line 1. # Failed test 'DBIx::Class::ResultSet::Graph loaded ok' # at t/00-compile.t line 71. # '' # doesn't match '(?^s:^\s*DBIx::Class::ResultSet::Graph ok)' # Looks like you failed 1 test of 5. t/00-compile.t ................ Dubious, test returned 1 (wstat 256, 0x100) Failed 1/5 subtests (etc.)
On 2016-11-17 01:22:22, SREZIC wrote: Show quoted text
> If Moose-2.1902-TRIAL is installed, then the DBIx-Class-Graph-1.05 > test suite fails: > > Output from './Build test': > > Could not generate inline handles for _graph->("" because : Failed to > compile source: syntax error at (eval 210) line 21, near """( "
The problem is that DBIx::Class::Graph::Role::ResultSet has this code: has _graph => ( is => 'rw', isa => 'DBIx::Class::Graph::Wrapper', lazy_build => 1, handles => \&_import_methods ); sub _import_methods { return map { $_ => $_ } grep { $_ ne 'new' && $_ !~ /^_/ } $_[1]->get_all_method_names; } The problem is that with more recent versions of Moose, the get_all_method_names method is returning something like '("' because overloading is somehow coming into play. I'm not sure _how_ that's happening, since I don't see it using overload. That said, I can't really figure out what's happening because this distro fails tests for me with Moose 2.1806 as well. It doesn't seem to be well maintained.
Download (untitled) / with headers
text/plain 102b
Actually, see https://rt.cpan.org/Ticket/Display.html?id=72864 Apparently it's been failing for ages.
RT-Send-CC: perler [...] cpan.org
Download (untitled) / with headers
text/plain 348b
On 2016-11-17 02:52:07, DROLSKY wrote: Show quoted text
> Actually, see https://rt.cpan.org/Ticket/Display.html?id=72864 > > Apparently it's been failing for ages.
That report is for 1.03. 1.05 looks quite green on the CPAN Testers Matrix (thought there could be more reports for newer perls @ Mac OS X): http://matrix.cpantesters.org/?dist=DBIx-Class-Graph+1.05
Download (untitled) / with headers
text/plain 1.1k
On 2016-11-17 02:29:59, SREZIC wrote: Show quoted text
> On 2016-11-17 02:52:07, DROLSKY wrote:
> > Actually, see https://rt.cpan.org/Ticket/Display.html?id=72864 > > > > Apparently it's been failing for ages.
> > That report is for 1.03. 1.05 looks quite green on the CPAN Testers > Matrix (thought there could be more reports for newer perls @ Mac OS > X): http://matrix.cpantesters.org/?dist=DBIx-Class-Graph+1.05
Ah, I see. The version in the repo is a little different from 1.05 and it appears to just be broken. What's odd is that the commit that broke it is from 2009 but the last release was 2011. I realized that the overloading comes from DBIx::Class::ResultSet::Graph extended DBIx::Class::ResultSet. The latter provides overloading. Here's a patch that fixes this module: --- lib/DBIx/Class/Graph/Role/ResultSet.pm 2016-11-19 10:01:47.390532328 -0600 +++ ResultSet.pm 2016-11-19 10:01:42.702436606 -0600 @@ -29,7 +29,7 @@ sub _import_methods { return map { $_ => $_ } - grep { $_ ne 'new' && $_ !~ /^_/ && !__PACKAGE__->can($_) } + grep { $_ ne 'new' && $_ !~ /^_/ && !__PACKAGE__->can($_) && $_ =~ /^[a-zA-Z]/ } $_[1]->get_all_method_names; }
Reported to DBIx-Class-Graph with patch at https://rt.cpan.org/Ticket/Display.html?id=118844
From: ppisar [...] redhat.com
We have similar failure in Archive-RPM <https://rt.cpan.org/Public/Bug/Display.html?id=120270>.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.