CC: | autarch [...] urth.org |
Subject: | Squirrel isn't usable after latest moose update |
Hi,
After Moose update 0.62->0.63 (because this I add Dave to CC, may be he
can help), modules uses Squirrel in some cases will break.
I try simplify test case (in attachment) maximum, but it requires
Data::Visitor.
Problem in my eyes:
1.
Data::Visitor, uses Squirrel
Data::Visitor::Callback subclass of Data::Visitor, uses Squirrel
Squirrel uses Mouse or Moose depend on INC
2. from test case
Some module uses Data::Visitor (before Moose loaded) - Mouse in game...
Next, another module load Moose and try use Data::Visitor::Callback -
Moose in game!!! but parent class already use Mouse
In that place something wrong now :-|
PS. "critical" because it completely break any big Catalyst app, if that
application uses Catalyst::Controller::HTML::FormFu...
It is a workaround - load Moose before any catalyst stuff, but...
Subject: | test-data-visitor.pl |
#!perl
my $data = 'ok';
print "1..2\n";
eval { test1::ok($data); 1 } or print "not ok - $@\n";
eval { test2::ok($data); 1 } or print "not ok - $@\n";
print "perl was: $]\n";
print "Mouse was: $Mouse::VERSION\n";
print "Moose was: $Moose::VERSION\n";
package test1;
use Data::Visitor;
use base 'Data::Visitor';
sub visit_value { print $_[1],"\n" }
sub ok {
print @Data::Visitor::ISA,"\n";
my $v = test1->new;
$v->visit(shift);
}
package test2;
use Moose; # comment this and all will be ok
use Data::Visitor::Callback;
sub ok {
print @Data::Visitor::ISA,"\n";
my $v = Data::Visitor::Callback->new(value => sub { print $_[1],"\n" });
$v->visit(shift);
}