Subject: | has [qw/one two/] => () not working |
Date: | Thu, 25 May 2017 17:11:06 +0000 |
To: | "bug-MooseX-MungeHas [...] rt.cpan.org" <bug-MooseX-MungeHas [...] rt.cpan.org> |
From: | Aaron Priven <APriven [...] actransit.org> |
MooseX::MungeHas isn’t successfully passing through the multiple attributes included in arrayrefs.
---
#!/usr/bin/env perl
package SomePackage;
use 5.024;
use Moose;
use MooseX::MungeHas;
has [qw/one two/] => (
is => 'ro',
);
say join(" " , sort ( __PACKAGE__->meta->get_method_list ) );
my $x = __PACKAGE__->new;
$x->two;
---
This returns
meta one
Can't locate object method "two" via package "SomePackage" at /tmp/q.pl line 18.
But if you comment out use MooseX::MungeHas, it returns
meta one two
---
Summary of my perl5 (revision 5 version 24 subversion 1) configuration:
Platform:
osname=darwin, osvers=16.5.0, archname=darwin-2level
uname='darwin mac83086.local 16.5.0 darwin kernel version 16.5.0: fri mar 3 16:52:33 pst 2017; root:xnu-3789.51.2~3release_x86_64 x86_64 '
config_args='-de -Dprefix=/Users/apriven/perl5/perlbrew/perls/perl-5.24.1 -Aeval:scriptdir=/Users/apriven/perl5/perlbrew/perls/perl-5.24.1/bin'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector-strong',
optimize='-O3',
cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector-strong'
ccversion='', gccversion='4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector-strong'
libpth=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib /usr/lib
libs=-lpthread -ldbm -ldl -lm -lutil -lc
perllibs=-lpthread -ldl -lm -lutil -lc
libc=, so=dylib, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -fstack-protector-strong'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
PERL_PRESERVE_IVUV USE_64_BIT_ALL USE_64_BIT_INT
USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME
USE_PERLIO USE_PERL_ATOF
Locally applied patches:
Devel::PatchPerl 1.38
Built under darwin
Compiled at May 1 2017 15:55:57
%ENV:
PERL5LIB="/Users/apriven/git/actium/lib"
PERLBREW_BASHRC_VERSION="0.78"
PERLBREW_HOME="/Users/apriven/.perlbrew"
PERLBREW_MANPATH="/Users/apriven/perl5/perlbrew/perls/perl-5.24.1/man"
PERLBREW_PATH="/Users/apriven/perl5/perlbrew/bin:/Users/apriven/perl5/perlbrew/perls/perl-5.24.1/bin"
PERLBREW_PERL="perl-5.24.1"
PERLBREW_ROOT="/Users/apriven/perl5/perlbrew"
PERLBREW_VERSION="0.78"
@INC:
/Users/apriven/git/actium/lib
/Users/apriven/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24.1/darwin-2level
/Users/apriven/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24.1
/Users/apriven/perl5/perlbrew/perls/perl-5.24.1/lib/5.24.1/darwin-2level
/Users/apriven/perl5/perlbrew/perls/perl-5.24.1/lib/5.24.1
.
--
Aaron Priven , Service Information Administrator
Alameda-Contra Costa Transit District (AC Transit)
1600 Franklin St., Oakland, CA USA 94612 / +1 510 891 4865