Skip Menu |

This queue is for tickets about the Getopt-Euclid CPAN distribution.

Report information
The Basics
Id: 37182
Status: resolved
Priority: 0/
Queue: Getopt-Euclid

People
Owner: Nobody in particular
Requestors: toddr [...] cpanel.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: v0.2.0
Fixed in: (no value)



Subject: Variable "%STD_CONSTRAINT_FOR" will not stay shared
I have recently moved to Strawberry perl 5.10 from 5.8.8. Upon installing Getopt::Euclid, I am getting the following bug when running programs. I'm hoping you can suggest if this is a new bug? Variable "%STD_CONSTRAINT_FOR" will not stay shared at :/strawberry/perl/site/lib/Getopt/Euclid.pm line 208. These bugs are also manifesting on install tests but do not cause the install tests to fail.
From: todd.e.rinaldo [...] jpmorgan.com
dmake test output for SP 5.10 --- C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0-NxGlao>perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Getopt::Euclid C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0-NxGlao>dmake cp lib/Getopt/Euclid/HierDemo.pm blib\lib\Getopt\Euclid\HierDemo.pm cp lib/Getopt/Euclid.pm blib\lib\Getopt\Euclid.pm C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0-NxGlao>dmake test C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "- e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*. t t/00.load.......................Variable "%STD_CONSTRAINT_FOR" will not stay shared at C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0- NxGlao\blib\lib/Getopt/Euclid.pm line 208. # Testing Getopt::Euclid 0.2.0 t/00.load.......................ok t/bundle........................Variable "%STD_CONSTRAINT_FOR" will not stay shared at C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0- NxGlao\blib\lib/Getopt/Euclid.pm line 208. t/bundle........................ok t/entity_angles.................Variable "%STD_CONSTRAINT_FOR" will not stay shared at C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0- NxGlao\blib\lib/Getopt/Euclid.pm line 208. t/entity_angles.................ok t/fail_bad_constraint...........ok t/fail_bad_default..............ok t/fail_minimal_clash............ok t/fail_misplaced_type...........ok t/fail_missing_required.........ok t/fail_missing_var..............ok t/fail_no_spec..................ok t/fail_type.....................ok t/fail_type_msg.................ok t/fail_unknown_arg..............ok t/fail_unknown_mode.............ok t/fail_unknown_spec.............ok t/fail_unknown_spec2............ok t/fail_unknown_type.............ok t/fail_user_constraint..........ok t/fail_user_constraint_comma....ok t/fail_user_constraint_type.....ok t/false.........................Variable "%STD_CONSTRAINT_FOR" will not stay shared at C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0- NxGlao\blib\lib/Getopt/Euclid.pm line 208. t/false.........................ok t/hier..........................Variable "%STD_CONSTRAINT_FOR" will not stay shared at C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0- NxGlao\blib\lib/Getopt/Euclid.pm line 208. t/hier..........................ok t/hier_export...................Variable "%STD_CONSTRAINT_FOR" will not stay shared at C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0- NxGlao\blib\lib/Getopt/Euclid.pm line 208. t/hier_export...................ok t/minimal.......................Variable "%STD_CONSTRAINT_FOR" will not stay shared at C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0- NxGlao\blib\lib/Getopt/Euclid.pm line 208. t/minimal.......................ok t/pod-coverage..................Variable "%STD_CONSTRAINT_FOR" will not stay shared at C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0- NxGlao\blib\lib/Getopt/Euclid.pm line 208. t/pod-coverage..................ok t/pod...........................ok t/quoted_args...................Variable "%STD_CONSTRAINT_FOR" will not stay shared at C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0- NxGlao\blib\lib/Getopt/Euclid.pm line 208. t/quoted_args...................ok t/regex_type....................Variable "%STD_CONSTRAINT_FOR" will not stay shared at C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0- NxGlao\blib\lib/Getopt/Euclid.pm line 208. t/regex_type....................ok t/repeatable....................Variable "%STD_CONSTRAINT_FOR" will not stay shared at C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0- NxGlao\blib\lib/Getopt/Euclid.pm line 208. t/repeatable....................ok t/repeated......................Variable "%STD_CONSTRAINT_FOR" will not stay shared at C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0- NxGlao\blib\lib/Getopt/Euclid.pm line 208. t/repeated......................ok t/simple........................Variable "%STD_CONSTRAINT_FOR" will not stay shared at C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0- NxGlao\blib\lib/Getopt/Euclid.pm line 208. t/simple........................ok t/simple_shuffle................Variable "%STD_CONSTRAINT_FOR" will not stay shared at C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0- NxGlao\blib\lib/Getopt/Euclid.pm line 208. t/simple_shuffle................ok t/vars_export...................Variable "%STD_CONSTRAINT_FOR" will not stay shared at C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0- NxGlao\blib\lib/Getopt/Euclid.pm line 208. t/vars_export...................ok All tests successful. Files=33, Tests=257, 3 wallclock secs ( 0.16 usr + 0.05 sys = 0.20 CPU) Result: PASS C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0-NxGlao>
From: todd.e.rinaldo [...] jpmorgan.com
Hi, The following is the output from dmake test on perl 5.8.8 for Strawberry Perl: CPAN: File::HomeDir loaded ok (v0.69) cpan shell -- CPAN exploration and modules installation (v1.9205) ReadLine support enabled Show quoted text
cpan> look Getopt::Euclid
Database was generated on Mon, 23 Jun 2008 16:40:14 GMT Updating database file ... Gathering information from index files ... Obtaining current state of database ... Populating database tables ... Done! Running look for module 'Getopt::Euclid' Trying to open a subshell in the build directory... Checksum for C:\strawberry\cpan\sources\authors\id\D\DC\DCONWAY\Getopt- Euclid-v0.2.0.tar.gz ok Scanning cache C:\strawberry\cpan\build for sizes ........................................................................ ....DONE Working directory is C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0- PKQWXR Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0-PKQWXR>perl -v This is perl, v5.8.8 built for MSWin32-x86-multi-thread Copyright 1987-2006, 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. C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0-PKQWXR>perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Getopt::Euclid C:\strawberry\cpan\build\Getopt-Euclid-v0.2.0-PKQWXR>dmake test cp lib/Getopt/Euclid/HierDemo.pm blib\lib\Getopt\Euclid\HierDemo.pm cp lib/Getopt/Euclid.pm blib\lib\Getopt\Euclid.pm C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "- e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*. t t/00.load.t.......................# Testing Getopt::Euclid 0.2.0 t/00.load.t.......................ok t/bundle.t........................ok t/entity_angles.t.................ok t/fail_bad_constraint.t...........ok t/fail_bad_default.t..............ok t/fail_minimal_clash.t............ok t/fail_misplaced_type.t...........ok t/fail_missing_required.t.........ok t/fail_missing_var.t..............ok t/fail_no_spec.t..................ok t/fail_type.t.....................ok t/fail_type_msg.t.................ok t/fail_unknown_arg.t..............ok t/fail_unknown_mode.t.............ok t/fail_unknown_spec.t.............ok t/fail_unknown_spec2.t............ok t/fail_unknown_type.t.............ok t/fail_user_constraint.t..........ok t/fail_user_constraint_comma.t....ok t/fail_user_constraint_type.t.....ok t/false.t.........................ok t/hier.t..........................ok t/hier_export.t...................ok t/minimal.t.......................ok t/pod-coverage.t..................ok t/pod.t...........................ok t/quoted_args.t...................ok t/regex_type.t....................ok t/repeatable.t....................ok t/repeated.t......................ok t/simple.t........................ok t/simple_shuffle.t................ok t/vars_export.t...................ok All tests successful. Files=33, Tests=257, 4 wallclock secs ( 0.14 usr + 0.14 sys = 0.28 CPU) Result: PASS
From: todd.e.rinaldo [...] jpmorgan.com
As a reccommended test case, you could add this to the top of all of your test files: use Test::NoWarnings;
The solution seems to be to disable closure warnings. E:\temp\Getopt-Euclid-v0.2.0\lib\Getopt> diff -u Euclid.pm.orig Euclid.pm --- Euclid.pm.orig Sat Aug 04 03:22:31 2007 +++ Euclid.pm Thu Oct 16 19:40:53 2008 @@ -205,6 +205,7 @@ my %STD_CONSTRAINT_FOR; BEGIN { + no warnings 'closure'; %STD_CONSTRAINT_FOR = ( 'string' => sub { 1 }, # Always okay (matcher ensures this) 'integer' => sub { 1 }, # Always okay (matcher ensures this) E:\temp\Getopt-Euclid-v0.2.0\lib\Getopt> perl -v This is perl, v5.10.0 built for MSWin32-x86-multi-thread (with 5 registered patches, see perl -V for more detail) Copyright 1987-2007, Larry Wall Binary build 1004 [287188] provided by ActiveState http://www.ActiveState.com Built Sep 3 2008 13:16:37 OS is Windows XP Pro SP3 E:\Home\asu1\Src\temp\Getopt-Euclid-v0.2.0> nmake -f Makefile test [output snipped] All tests successful. Files=33, Tests=257, 8 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU)
Hi, I would like to see this in next release if possible. From the looks of it, 1. We have a valid test by adding Test::NoWarnings to prove it breaks. 2. We have a valid fix by disabling closure warnings in the begin block. Thanks,
Hi Todd, Can you please checkout the the release candidate for Getopt::Euclid 0.2.1 at: https://getopt-euclid.svn.sourceforge.net/svnroot/getopt-euclid/tags/02.1_2 I have removed the begin blocks, so let me know if that fixes the strawberry perl issue. -Kevin On Thu May 21 17:21:27 2009, todd_rinaldo wrote: Show quoted text
> Hi, I would like to see this in next release if possible. > > From the looks of it, > 1. We have a valid test by adding Test::NoWarnings to prove it breaks. > 2. We have a valid fix by disabling closure warnings in the begin block. > > Thanks, >
From: todd.e.rinaldo [...] jpmorgan.com
Show quoted text
> Can you please checkout the the release candidate for Getopt::Euclid
Make test works without errors or warnings now on the RC. I realize it's an extra dependency, but I'd really reccommend you add Test::NoWarnings to your test modules. http://search.cpan.org/perldoc?Test::NoWarnings
On Tue May 26 11:46:36 2009, todd_rinaldo wrote: Show quoted text
> > Can you please checkout the the release candidate for Getopt::Euclid
> Make test works without errors or warnings now on the RC.
Thanks for checking that. Show quoted text
> I realize it's an extra dependency, but I'd really reccommend you add > Test::NoWarnings to your test modules.
Makes sense.
Show quoted text
> > I realize it's an extra dependency, but I'd really reccommend you
add Show quoted text
> > Test::NoWarnings to your test modules.
> > Makes sense.
I take that back. Euclid throws warnings when it fails, and since some of these test check for Euclid failing, Test::NoWarnings causes the test to fail. I will not be adding Test::NoWarnings.
Version 0.2.1 is out which fixes this issue. Will look into using Test::NoWarnings, but it might take some time.