When trying to construct a Gtk2 widget, an error is produced that
BUILDALL cannot be called on Gtk2::<widget>.
I tracked this down to line 150 in .\Meta\Role\Class.pm
my $instance = $super_new->execute($class, @foreign_params);
$instance is not returning a My:Entry, it is returning a Gtk2::Entry.
Subject: | mx_nomoose_gtk2.t |
package Foo;
sub new {
my $class = shift;
return bless { }, $class;
}
package Foo::Bar;
use Moose;
use MooseX::NonMoose;
extends 'Foo';
package Gtk2::Mx::Entry;
use Gtk2;
use Moose;
use MooseX::NonMoose;
extends 'Gtk2::Entry';
package main;
use Test::More 'no_plan';
use Gtk2 '-init';
my $o = Foo::Bar->new;
ok($o->isa('Foo'), 'object isa Foo');
ok($o->isa('Foo::Bar'), 'object isa Foo::Bar');
# FOLLOWING LINE PRODUCES THIS ERROR:
# Can't locate object method "BUILDALL" via package "Gtk2::Entry" at lib/MooseX/Gt
# k2/Meta/Role/Class.pm line 156.
my $e = Gtk2::Mx::Entry->new;
ok($e->isa('Gtk2::Entry'), 'object isa Gtk2::Entry');
ok($e->isa('Gtk2::Mx::Entry'), 'object is Gtk2::Mx::Entry');