Subject: | Function::Parameters + Types::Standard + B::Deparse -> =( |
Not sure if this is a Function::Parameters or Types::Standard bug, but there seems to be some negative interaction with the two when trying to deparse (the code runs fine, however):
ski@dev-ski 22:35:27 ~
$ cat /tmp/foo3.pl
use strict;
use warnings;
use Function::Parameters;
use Types::Standard qw( Int );
method set_age( Int $age ) {
$self->{ 'age' } = $age;
}
ski@dev-ski 22:35:28 ~
$ perl -MO=Deparse /tmp/foo3.pl &
[1] 1981
ski@dev-ski 22:35:38 ~
$ sleep 10
ski@dev-ski 22:35:50 ~
$ ps auxww | grep foo3
2104 1981 103 1.6 218888 132700 pts/5 R 22:35 0:15 perl -MO=Deparse /tmp/foo3.pl
2104 2071 0.0 0.0 61188 740 pts/5 R+ 22:35 0:00 grep foo3
ski@dev-ski 22:35:53 ~
$ kill %1
[1]+ Terminated perl -MO=Deparse /tmp/foo3.pl
ski@dev-ski 22:36:32 ~
$ perl -v
This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-thread-multi
Copyright 1987-2011, 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 kit.
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 Page.
ski@dev-ski 22:36:46 ~
$ perl -V
Summary of my perl5 (revision 5 version 14 subversion 2) configuration:
Platform:
osname=linux, osvers=2.6.18-274.7.1.el5, archname=x86_64-linux-thread-multi
uname='linux dev-bszymanski.local 2.6.18-274.7.1.el5 #1 smp thu oct 20 16:21:01 edt 2011 x86_64 x86_64 x86_64 gnulinux '
config_args='-des -Dcc=gcc -Dprefix=/home/bszymanski/perl5 -Dusethreads -Duseshrplib -Duseithreads -U installusrbinperl -Ddestdir=/home/bszymanski/perl5 -Doptimize=-g'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-g',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.1.2 20080704 (Red Hat 4.1.2-51)', 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='gcc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 /usr/local/lib64
libs=-lnsl -lgdbm -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.5.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.5'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/home/bszymanski/perl5/lib/5.14.2/x86_64-linux-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-shared -g -L/usr/local/lib -fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
PERL_PRESERVE_IVUV USE_64_BIT_ALL USE_64_BIT_INT
USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF
USE_REENTRANT_API
Built under linux
Compiled at May 19 2014 10:33:41
%ENV:
PERL5LIB="/home/bszymanski/devperl/lib:/home/bszymanski/perl5/lib:/home/bszymanski/devperl/lib/site_perl/5.14.2:/home/bszymanski/proj/tgservices/lib:/home/bszymanski/proj/Sphorb/lib:/home/bszymanski/devperl/lib/perl:/home/bszymanski/devperl/lib/perl5:/home/bszymanski/devperl/lib64/perl:/home/bszymanski/devperl/lib64/perl5:/usr/local/lib/site_perl:/home/bszymanski/perl5/lib"
@INC:
/home/bszymanski/devperl/lib/5.14.2/x86_64-linux-thread-multi
/home/bszymanski/devperl/lib/5.14.2
/home/bszymanski/devperl/lib
/home/bszymanski/perl5/lib/5.14.2/x86_64-linux-thread-multi
/home/bszymanski/perl5/lib/5.14.2
/home/bszymanski/perl5/lib
/home/bszymanski/devperl/lib/site_perl/5.14.2/x86_64-linux-thread-multi
/home/bszymanski/devperl/lib/site_perl/5.14.2
/home/bszymanski/proj/tgservices/lib
/home/bszymanski/proj/Sphorb/lib
/home/bszymanski/devperl/lib/perl
/home/bszymanski/devperl/lib/perl5
/home/bszymanski/devperl/lib64/perl
/home/bszymanski/devperl/lib64/perl5
/usr/local/lib/site_perl
/home/bszymanski/perl5/lib/5.14.2/x86_64-linux-thread-multi
/home/bszymanski/perl5/lib/5.14.2
/home/bszymanski/perl5/lib
/home/bszymanski/perl5/lib/site_perl/5.14.2/x86_64-linux-thread-multi
/home/bszymanski/perl5/lib/site_perl/5.14.2
/home/bszymanski/perl5/lib/5.14.2/x86_64-linux-thread-multi
/home/bszymanski/perl5/lib/5.14.2
.
ski@dev-ski 22:36:47 ~
$
FWIW, getting rid of the type constraint in the signature makes Deparse work again.