Hi Perlmonks,
I have written a bunch of modules using mouse in our test environment and tested them accordingly without errors. Then I pushed them into production and got this error:
The method 'BUILDARGS' was not found in the inheritance hierarchy for
+Utils::SyncDceBluegroup::PersonCache at /usr/local/site_perl/aix/aix-
+thread-multi/Mouse/Meta/Class.pm line 322, <DATA> line 755.
Mouse::Meta::Class::_install_modifier(Mouse::Meta::Class=HASH(
+0x31287cc8), "around", "BUILDARGS", CODE(0x312aff38)) called at /usr/
+local/site_perl/aix/aix-thread-multi/Mouse/Meta/Class.pm line 394
Mouse::Meta::Class::add_around_method_modifier(Mouse::Meta::Cl
+ass=HASH(0x31287cc8), "BUILDARGS", CODE(0x312aff38)) called at /usr/l
+ocal/site_perl/aix/aix-thread-multi/Mouse.pm line 79
Mouse::around("BUILDARGS") called at /usr/local/site_perl/comm
+on/Utils/SyncDceBluegroup/PersonCache.pm line 144
require Utils/SyncDceBluegroup/PersonCache.pm called at /usr/l
+ocal/site_perl/common/Utils/SyncDceBluegroup/AIXUseridCache.pm line 9
require Utils/SyncDceBluegroup/AIXUseridCache.pm called at /us
+r/local/site_perl/common/Utils/SyncDceBluegroup.pm line 10
require Utils/SyncDceBluegroup.pm called at ./SyncDceBluegroup
+.t line 8
main::BEGIN() called at /usr/local/site_perl/common/Utils/Sync
+DceBluegroup/PersonCache.pm line 0
eval {...} called at /usr/local/site_perl/common/Utils/SyncDce
+Bluegroup/PersonCache.pm line 0
Compilation failed in require at /usr/local/site_perl/common/Utils/Syn
+cDceBluegroup/AIXUseridCache.pm line 9, <DATA> line 755.
Compilation failed in require at /usr/local/site_perl/common/Utils/Syn
+cDceBluegroup.pm line 10, <DATA> line 755.
Compilation failed in require at ./SyncDceBluegroup.t line 8, <DATA> l
+ine 755.
BEGIN failed--compilation aborted at ./SyncDceBluegroup.t line 8, <DAT
+A> line 755.
# Looks like your test exited with 255 before it could output anything
+.
What completely baffles me is that I cannot see a difference between the test environment and production. We are working on AIX, but its the same level. It uses the same perl. It uses the same version of Mouse:
user@test:/common/admin/perltests/modules# oslevel -s
7200-01-01-1642
user@test:/common/admin/perltests/modules# perl -v
This is perl 5, version 20, subversion 1 (v5.20.1) built for aix-threa
+d-multi
Copyright 1987-2014, Larry Wall
Perl may be copied only under the terms of either the Artistic License
+ or the
GNU General Public License, which may be found in the Perl 5 source ki
+t.
Complete documentation for Perl, including FAQ lists, should be found
+on
this system using "man perl" or "perldoc perl". If you have access to
+ the
Internet, point your browser at http://www.perl.org/, the Perl Home Pa
+ge.
user@test:/common/admin/perltests/modules# perl -MMouse -e 'print Mous
+e->VERSION,"\n"'
+
v2.4.5
user@production:/common/admin/perltests/modules/Utils_SyncDceBluegroup
+$ oslevel -s
7200-01-01-1642
user@production:/common/admin/perltests/modules/Utils_SyncDceBluegroup
+$ perl -v
This is perl 5, version 20, subversion 1 (v5.20.1) built for aix-threa
+d-multi
Copyright 1987-2014, Larry Wall
Perl may be copied only under the terms of either the Artistic License
+ or the
GNU General Public License, which may be found in the Perl 5 source ki
+t.
Complete documentation for Perl, including FAQ lists, should be found
+on
this system using "man perl" or "perldoc perl". If you have access to
+ the
Internet, point your browser at http://www.perl.org/, the Perl Home Pa
+ge.
user@production:/common/admin/perltests/modules/Utils_SyncDceBluegroup
+$ perl -MMouse -e 'print Mouse->VERSION,"\n"'
v2.4.5
What could go wrong that this error appears in production?
The offending code looks like this:
around BUILDARGS => sub {
my $orig = shift;
my $class = shift;
return $class->$orig( member_type => 'Utils::SyncDceBluegroup::Per
+son' );
};
I am pretty shure I used the BUILDARGS correctly and I am not doing anything especially complicated here...
Any Ideas?
Kind regards,
yulivee