# New Ticket Created by James Keenan # Please include the string: [perl #44565] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=44565 >
--- osname= linux osvers= 2.6.18.3 arch= i486-linux-gnu-thread-multi cc= cc --- Flags: category=core severity=medium ack=no --- Here is a patch to Parrot::Configure::Step::Base. As developed in the reconfigure/ branch, this improves the coverage of the file's code by the test suite to 100% in all categories (see http://thenceforward.net/parrot/coverage/configure-build/lib-Parrot-Configure-Step-Base-pm.html). There is one minor change in functionality: elimination of the 'ref $class' in the constructor. Since this is a base class from which all the packages in config/*/*.pm inherit, there is no point to having this package's constructor allow the possibility of being called as an object method. And, in fact, there is not a single instance of that usage of the constructor anywhere in the Parrot distribution. (In fact, AFAICT, only one of this package's methods is used extensively.) So there should be no impact on performance. This will be applied to trunk in about three days unless there is serious objection. Thank you very much. kid51 Index: lib/Parrot/Configure/Step/Base.pm =================================================================== --- lib/Parrot/Configure/Step/Base.pm (revision 20607) +++ lib/Parrot/Configure/Step/Base.pm (working copy) @@ -46,8 +46,7 @@ sub new { my $class = shift; - - return bless {}, ref $class || $class; + return bless {}, $class; } =back @@ -101,7 +100,7 @@ sub description { my $class = shift; - $class = ref $class || $class; + $class = (ref $class) ? ref $class : $class; { no strict 'refs'; return ${ $class . "::description" }; @@ -119,7 +118,7 @@ sub args { my $class = shift; - $class = ref $class || $class; + $class = (ref $class) ? ref $class : $class; { no strict 'refs'; return @{ $class . "::args" }; --- Summary of my parrot 0.4.14 (r20607) configuration: configdate='Sat Aug 11 13:48:20 2007 GMT' Platform: osname=linux, archname=i686-linux jitcapable=1, jitarchname=i386-linux, jitosname=LINUX, jitcpuarch=i386 execcapable=1 perl=/usr/local/bin/perl Compiler: cc='cc', ccflags=' -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED -DHASATTRIBUTE_WARN_UNUSED_RESULT', Linker and Libraries: ld='cc', ldflags=' -L/usr/local/lib', cc_ldflags='', libs='-lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt' Dynamic Linking: share_ext='.so', ld_share_flags='-shared -L/usr/local/lib -fPIC', load_ext='.so', ld_load_flags='-shared -L/usr/local/lib -fPIC' Types: iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4, ptrsize=4, ptr_alignment=1 byteorder=1234, nv=double, numvalsize=8, doublesize=8 --- Environment: HOME =/home/jimk LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH =/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/mysql/bin:/home/jimk/bin:/home/jimk/bin/perl SHELL =/bin/bash