Subject: | MooseX::MultiMethods doesn't play well with MooseX::Declare? |
I am not clever enough to tell if this is a problem with my code,
MooseX::Declare or MooseX::MultiMethods, so I apologize if I guessed
wrong. This may even be a dupe of #49793?
Source:
use MooseX::Declare;
class ShowBug {
use MooseX::MultiMethods;
multi method say (Str $x) { printf "'$x' is a string\n" }
multi method say (Int $x) { printf "$x is an integer\n" }
}
my $bug = new ShowBug;
$bug->say(1);
$bug->say("hello world");
Result:
$ perl declare-multi-bug
method doesn't have an actual body yet at
/home/rdefores/localperl/lib/site_perl/5.12.1/MooseX/Method/Signatures/Meta/Method.pm
line 116
Class::MOP::Class:::before('MooseX::Method::Signatures::Meta::Method=HASH(0x23f57f0)')
called at
/home/rdefores/localperl/lib/site_perl/5.12.1/x86_64-linux/Class/MOP/Method/Wrapped.pm
line 47
Class::MOP::Method::Wrapped::__ANON__('MooseX::Method::Signatures::Meta::Method=HASH(0x23f57f0)')
called at
/home/rdefores/localperl/lib/site_perl/5.12.1/x86_64-linux/Class/MOP/Method/Wrapped.pm
line 89
MooseX::Method::Signatures::Meta::Method::actual_body('MooseX::Method::Signatures::Meta::Method=HASH(0x23f57f0)')
called at
/home/rdefores/localperl/lib/site_perl/5.12.1/MooseX/Method/Signatures/Meta/Method.pm
line 146
MooseX::Method::Signatures::Meta::Method::__ANON__('ShowBug=HASH(0xf60448)',
1) called at declare-multi-bug line 21
Version information:
$ perl -E 'for (@ARGV) { eval qq{use $_; say "$_ " .
\$${_}::VERSION;} } ' \
MooseX::Declare MooseX::MultiMethods \
MooseX::Method::Signatures Class::MOP |
column -t
MooseX::Declare 0.33
MooseX::MultiMethods 0.10
MooseX::Method::Signatures 0.33
Class::MOP 1.04
$ perl -V
Summary of my perl5 (revision 5 version 12 subversion 1) configuration:
Platform:
osname=linux, osvers=2.6.27.30-170.2.82.fc10.x86_64,
archname=x86_64-linux
uname='linux chatterer 2.6.27.30-170.2.82.fc10.x86_64 #1 smp mon
aug 17 08:18:34 edt 2009 x86_64 x86_64 x86_64 gnulinux '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include'
ccversion='', gccversion='4.3.2 20081105 (Red Hat 4.3.2-7)',
gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8,
Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64
libs=-lnsl -lgdbm -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.9.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.9'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib
-fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
USE_64_BIT_ALL
USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO
USE_PERL_ATOF
Built under linux
Compiled at May 25 2010 15:58:29
@INC:
/home/rdefores/localperl/lib/site_perl/5.12.1/x86_64-linux
/home/rdefores/localperl/lib/site_perl/5.12.1
/home/rdefores/localperl/lib/5.12.1/x86_64-linux
/home/rdefores/localperl/lib/5.12.1
/home/rdefores/localperl/lib/site_perl/5.12.0/x86_64-linux
/home/rdefores/localperl/lib/site_perl/5.12.0
/home/rdefores/localperl/lib/site_perl/5.10.1
/home/rdefores/localperl/lib/site_perl
.