module-build-general Mailing List for Module::Build (Page 4)
Status: Beta
Brought to you by:
kwilliams
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(24) |
Sep
(2) |
Oct
(18) |
Nov
(36) |
Dec
(17) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(3) |
Feb
(96) |
Mar
(82) |
Apr
(63) |
May
(90) |
Jun
(52) |
Jul
(94) |
Aug
(89) |
Sep
(75) |
Oct
(118) |
Nov
(101) |
Dec
(111) |
2004 |
Jan
(159) |
Feb
(155) |
Mar
(65) |
Apr
(121) |
May
(62) |
Jun
(68) |
Jul
(54) |
Aug
(45) |
Sep
(78) |
Oct
(80) |
Nov
(271) |
Dec
(205) |
2005 |
Jan
(128) |
Feb
(96) |
Mar
(83) |
Apr
(113) |
May
(46) |
Jun
(120) |
Jul
(146) |
Aug
(47) |
Sep
(93) |
Oct
(118) |
Nov
(116) |
Dec
(60) |
2006 |
Jan
(130) |
Feb
(330) |
Mar
(228) |
Apr
(203) |
May
(97) |
Jun
(15) |
Jul
(6) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Ken W. <ke...@ma...> - 2006-05-12 21:25:32
|
Hi Stephen, The patch looks good except that it got mangled a little in the email message. I've applied it and all tests pass for me. Thanks! -Ken On May 11, 2006, at 11:50 PM, Stephen Adkins wrote: > Hi, > > I wrote Module::Build::YAML. > I offer these patches. > > Both of the previously mentioned broken YAML files were a > result of embedded newlines. I opted to tackle newlines and > all of the other special characters which I could find which > YAML considers special. > > I think this version will be quite an improvement in terms of > robustness in the presence of "odd" characters in the scalar > values. I patched > > lib/Module/Build/YAML.pm > t/mbyaml.t > > The "svn diff" is below. I also attach a tar.gz of the two full > files in case > I did the patch wrong. > > Stephen > > spadkins@pompeii:/usr/rubicon/spadkins/src/app/Module-Build> svn diff > Index: t/mbyaml.t > =================================================================== > --- t/mbyaml.t (revision 6288) > +++ t/mbyaml.t (working copy) > @@ -9,9 +9,12 @@ > $dir = "t" if (-d "t"); > > { > - use_ok("Module::Build::YAML"); > - my ($expected, $got, $var); > - $var = { > + use_ok("Module::Build::YAML"); > + my ($expected, $got, $var); > + ########################################################## > + # Test a typical-looking Module::Build structure (alphabetized) > + ########################################################## > + $var = { > 'resources' => { > 'license' => > 'http://opensource.org/licenses/artistic-license.php' > }, > @@ -43,11 +46,11 @@ > }, > 'abstract' => 'A framework for building dynamic widgets or > full applications in Javascript' > }; > - $expected = <<EOF; > + $expected = <<'EOF'; > --- > abstract: A framework for building dynamic widgets or full > applications in Javascript > author: > - - '"Stephen Adkins" <spadkins\@gmail.com>' > + - '"Stephen Adkins" <spa...@gm...>' > build_requires: > App::Build: 0 > File::Spec: 0 > @@ -72,12 +75,15 @@ > $got = &Module::Build::YAML::Dump($var); > is($got, $expected, "Dump(): single deep hash"); > > - $expected = <<EOF; > + ########################################################## > + # Test a typical-looking Module::Build structure (ordered) > + ########################################################## > + $expected = <<'EOF'; > --- > name: js-app > version: 0.13 > author: > - - '"Stephen Adkins" <spadkins\@gmail.com>' > + - '"Stephen Adkins" <spa...@gm...>' > abstract: A framework for building dynamic widgets or full > applications in Javascript > license: lgpl > resources: > @@ -102,13 +108,16 @@ > $got = &Module::Build::YAML::Dump($var); > is($got, $expected, "Dump(): single deep hash, ordered"); > > + ########################################################## > + # Test that an array turns into multiple documents > + ########################################################## > $var = [ > "e", > 2.71828, > [ "pi", "is", 3.1416 ], > { fun => "under_sun", 6 => undef, "more", undef }, > ]; > - $expected = <<EOF; > + $expected = <<'EOF'; > --- > e > --- > @@ -118,14 +127,17 @@ > - is > - 3.1416 > --- > -6: "" > +6: ~ > fun: under_sun > -more: "" > +more: ~ > EOF > $got = &Module::Build::YAML::Dump(@$var); > is($got, $expected, "Dump(): multiple, various"); > > - $expected = <<EOF; > + ########################################################## > + # Test that a single array ref turns into one document > + ########################################################## > + $expected = <<'EOF'; > --- > - e > - 2.71828 > @@ -134,16 +146,115 @@ > - is > - 3.1416 > - > - 6: "" > + 6: ~ > fun: under_sun > - more: "" > + more: ~ > EOF > $got = &Module::Build::YAML::Dump($var); > is($got, $expected, "Dump(): single array of various"); > > + ########################################################## > + # Test Object-Oriented Flavor of the API > + ########################################################## > my $y = Module::Build::YAML->new(); > $got = $y->Dump($var); > is($got, $expected, "Dump(): single array of various (OO)"); > + > + ########################################################## > + # Test Quoting Conditions (newlines, quotes, tildas, undefs) > + ########################################################## > + $var = { > + 'foo01' => '`~!@#$%^&*()_+-={}|[]\\;\':",./?<> > +<nl>', > + 'foo02' => '~!@#$%^&*()_+-={}|[]\\;:,./<>?', > + 'foo03' => undef, > + 'foo04' => '~', > + }; > + $expected = <<'EOF'; > +--- > +foo01: "`~!@#$%^&*()_+-={}|[]\;':\",./?<>\n<nl>" > +foo02: "~!@#$%^&*()_+-={}|[]\;:,./<>?" > +foo03: ~ > +foo04: "~" > +EOF > + $got = &Module::Build::YAML::Dump($var); > + is($got, $expected, "Dump(): tricky embedded characters"); > + > + $var = { > + 'foo10' => undef, > + 'foo40' => '!', > + 'foo41' => '@', > + 'foo42' => '#', > + 'foo43' => '$', > + 'foo44' => '%', > + 'foo45' => '^', > + 'foo47' => '&', > + 'foo48' => '*', > + 'foo49' => '(', > + 'foo50' => ')', > + 'foo51' => '_', > + 'foo52' => '+', > + 'foo53' => '-', > + 'foo54' => '=', > + 'foo55' => '{', > + 'foo56' => '}', > + 'foo57' => '|', > + 'foo58' => '[', > + 'foo59' => ']', > + 'foo60' => '\\', > + 'foo61' => ';', > + 'foo62' => ':', > + 'foo63' => ',', > + 'foo64' => '.', > + 'foo65' => '/', > + 'foo66' => '<', > + 'foo67' => '>', > + 'foo68' => '?', > + 'foo69' => '\'', > + 'foo70' => '"', > + 'foo71' => '`', > + 'foo72' => ' > +', > + }; > + $expected = <<'EOF'; > +--- > +foo10: ~ > +foo40: "!" > +foo41: '@' > +foo42: "#" > +foo43: $ > +foo44: % > +foo45: "^" > +foo47: "&" > +foo48: "*" > +foo49: "(" > +foo50: ")" > +foo51: _ > +foo52: + > +foo53: - > +foo54: = > +foo55: "{" > +foo56: "}" > +foo57: "|" > +foo58: "[" > +foo59: "]" > +foo60: \ > +foo61: ; > +foo62: : > +foo63: , > +foo64: . > +foo65: / > +foo66: '<' > +foo67: '>' > +foo68: "?" > +foo69: "'" > +foo70: '"' > +foo71: "`" > +foo72: "\n" > +EOF > + $got = &Module::Build::YAML::Dump($var); > + is($got, $expected, "Dump(): tricky embedded characters > (singles)"); > + > } > > > Index: lib/Module/Build/YAML.pm > =================================================================== > --- lib/Module/Build/YAML.pm (revision 6288) > +++ lib/Module/Build/YAML.pm (working copy) > @@ -102,26 +102,31 @@ > } > > sub _yaml_value { > - # XXX doesn't handle embedded newlines > my ($value) = @_; > - # undefs and empty strings will become empty strings > - if (! defined $value || $value eq "") { > + # undefs become ~ > + if (! defined $value) { > + return("~"); > + } > + # empty strings will become empty strings > + elsif (! defined $value || $value eq "") { > return('""'); > } > + # quote and escape strings with special values > + elsif ($value =~ /["'`~\n!\@\#^\&\*\(\)\{\}\[\]\|<>\?]/) { > + if ($value !~ /['`~\n!\#^\&\*\(\)\{\}\[\]\|\?]/) { # nothing but > " or @ or < or > (email addresses) > + return("'" . $value . "'"); > + } > + else { > + $value =~ s/\n/\\n/g; # handle embedded newlines > + $value =~ s/"/\\"/g; # handle embedded quotes > + return('"' . $value . '"'); > + } > + } > # allow simple scalars (without embedded quote chars) to be unquoted > - elsif ($value !~ /["'\\]/) { > + # (includes $%_+=-\;:,./) > + else { > return($value); > } > - # strings without double-quotes get double-quoted > - elsif ($value !~ /\"/) { > - $value =~ s{\\}{\\\\}g; > - return qq{"$value"}; > - } > - # other strings get single-quoted > - else { > - $value =~ s{([\\'])}{\\$1}g; > - return qq{'$value'}; > - } > } > > 1; > ================================================= > > On 5/11/06, Johan Vromans <jvr...@sq...> wrote: >> and...@fr... (Andreas J. Koenig) writes: >> >> >>>>>> On Wed, 10 May 2006 08:40:33 +0200, >> and...@fr... (Andreas J. Koenig) said: >> > >> > > This seems to be a bug in Module::Build that is still there >> in 0.28. >> > >> > Another case where Module::Build without YAML fails is PHILCROW/ >> Gantry-3.30.tar.gz >> > >> > M:B generates a YAML file that contains >> > >> > ----snip---- >> > author: >> > - Tim Keefer <tk...@gm...> >> > Phil Crow <phi...@ya...> >> > ----snip---- >> >> In the current Module::Build::YAML, line 105, read: >> >> # XXX doesn't handle embedded newlines >> >> Shouldn't be so hard to fix... >> >> -- Johan >> >> >> ------------------------------------------------------- >> Using Tomcat but need to do more? Need to support web services, >> security? >> Get stuff done quickly with pre-integrated technology to make your >> job easier >> Download IBM WebSphere Application Server v.1.0.1 based on Apache >> Geronimo >> http://sel.as-us.falkag.net/sel? >> cmd=lnk&kid=120709&bid=263057&dat=121642 >> _______________________________________________ >> Module-build-general mailing list >> Mod...@li... >> https://lists.sourceforge.net/lists/listinfo/module-build-general >> >> <mbyaml-patch.tar.gz> |
From: Ken W. <ke...@ma...> - 2006-05-12 19:37:35
|
On May 12, 2006, at 2:31 PM, Chris Dolan wrote: > > Now that I have read over the code to CPANPLUS::Dist::Build that > seems to be the case. CP+ doesn't consider the case where it is > building Module::Build itself, and uses a pre-loaded M::B. It > seems to me that CPANPLUS::Dist::Build should fall back to > Makefile.PL mode (i.e. running external files) when it detects that > its trying to compile M::B itself. Yes, that's exactly my opinion too. -Ken |
From: Chris D. <ch...@cl...> - 2006-05-12 19:31:33
|
On May 12, 2006, at 12:13 PM, Ken Williams wrote: > Hi Chris, > > Your patch shouldn't work - curdir() doesn't return an absolute > path, just a string like ".". > > I suspect your change seemed to fix your problem because you tested > manually, i.e. not using CPANPLUS? > > -Ken Ken, Hmm, you're absolutely right, sorry about that. So, my diagnosis was completely wrong and it's CP+ that's grabbing the wrong M::B and not the fault of the chdir? [time passes] Now that I have read over the code to CPANPLUS::Dist::Build that seems to be the case. CP+ doesn't consider the case where it is building Module::Build itself, and uses a pre-loaded M::B. It seems to me that CPANPLUS::Dist::Build should fall back to Makefile.PL mode (i.e. running external files) when it detects that its trying to compile M::B itself. What a quagmire... Chris -- Chris Dolan, Software Developer, Clotho Advanced Media Inc. 608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703 vCard: http://www.chrisdolan.net/ChrisDolan.vcf Clotho Advanced Media, Inc. - Creators of MediaLandscape Software (http://www.media-landscape.com/) and partners in the revolutionary Croquet project (http://www.opencroquet.org/) |
From: Johan V. <jvr...@sq...> - 2006-05-12 19:16:53
|
"Stephen Adkins" <spa...@gm...> writes: > I wrote Module::Build::YAML. > I offer these patches. Thanks! For the sake of acceptance, I strongly suggest to release a 0.29 version ASAP. Stephen, how about turning M::B::YAML into YAML::Light and let the world benefit from it? -- Johan |
From: Ken W. <ke...@ma...> - 2006-05-12 17:13:41
|
Hi Chris, Your patch shouldn't work - curdir() doesn't return an absolute path, just a string like ".". I suspect your change seemed to fix your problem because you tested manually, i.e. not using CPANPLUS? -Ken On May 12, 2006, at 9:06 AM, Chris Dolan wrote: > [Sorry to post this to the list. RT seems to be down right now...] > > I just tried installing 0.28 via CPANPLUS on a Mac 10.4 box where I > had 0.27_06 installed before and got the following errors: > > t/ppm............. * ERROR: Configuration was initially created > with Module::Build version '0.2706', > but we are now using version '0.28'. Please re-run the Build.PL > or Makefile.PL script. > t/ppm.............dubious > Test returned status 2 (wstat 512, 0x200) > > t/xs.............. * ERROR: Configuration was initially created > with Module::Build version '0.2706', > but we are now using version '0.28'. Please re-run the Build.PL > or Makefile.PL script. > t/xs..............dubious > Test returned status 255 (wstat 65280, 0xff00) > > The issue seems to be that Build.PL shifts 'lib' and 't/lib' onto > the @INC stack as relative paths. Then when some of the regression > tests chdir, they fail to find the 0.28 .pm files and instead find > the old ones. The following patch works for me by forcing the @INC > additions to be absolute instead of relative. > > Chris > > > --- /Users/chris/Work/Module-Build/Build.PL 2006-01-20 > 08:29:14.000000000 -0600 > +++ Build.PL 2006-05-12 08:58:15.000000000 -0500 > @@ -3,19 +3,15 @@ > # On some platforms (*ahem*, MacPerl 5.6.1) "use lib qw(lib);" > doesn't > # find the local "lib" directory, so we use File::Spec to do it > properly. > use File::Spec 0.82; > -use lib File::Spec->catdir('lib'); # use our self to install > -use lib File::Spec->catdir('t', 'lib'); # use bundled Test::More > +use lib File::Spec->catdir(File::Spec->curdir, 'lib'); # use > our self to install > +use lib File::Spec->catdir(File::Spec->curdir, 't', 'lib'); # use > bundled Test::More > > # We use Module::Build to test & install itself. > use Module::Build; > > > -- > Chris Dolan, Software Developer, Clotho Advanced Media Inc. > 608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703 > vCard: http://www.chrisdolan.net/ChrisDolan.vcf > > Clotho Advanced Media, Inc. - Creators of MediaLandscape Software > (http://www.media-landscape.com/) and partners in the revolutionary > Croquet project (http://www.opencroquet.org/) > > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Module-build-general mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/module-build-general |
From: Ken W. <ke...@ma...> - 2006-05-12 17:06:59
|
Hi Ben, That looks to me like a File::Spec problem. Could you tell us what version of File::Spec you currently have installed? We may need to change the version we depend on for Win32 users. -Ken On May 12, 2006, at 9:35 AM, Ben Lavender wrote: > Hi all, > > Module::Build won't install for me and I can't find anyone else on the > net with my problem. > > My setup is XP SP 2. > ------perl -v: > > This is perl, v5.6.1 built for MSWin32-x86-multi-thread > (with 1 registered patch, see perl -V for more detail) > > Copyright 1987-2001, Larry Wall > > Binary build 635 based on sources provided by > ActiveState Corp. http://www.ActiveState.com > Built 21:04:21 Feb 25 2003 > > -----Error (perl Build.PL works fine): > C:\Documents and Settings\Administrator\Desktop\firebird incoming > \Module-Build-0 > .28.tar\Module-Build-0.28>Build > Use of uninitialized value in pattern match (m//) at c:/work/Perl/ > lib/File/Spec/ > Win32.pm line 72. > Use of uninitialized value in pattern match (m//) at c:/work/Perl/ > lib/File/Spec/ > Win32.pm line 72. > Use of uninitialized value in pattern match (m//) at c:/work/Perl/ > lib/File/Spec/ > Win32.pm line 140. > mkdir blib\binhtml\bin\C:.: Invalid argument at lib/Module/Build/ > Base.pm line 25 > 29 > > Any assistance would be appreciated! Please let me know if more > information is required. |
From: Ben L. <bla...@gm...> - 2006-05-12 15:04:15
|
Hi all, Module::Build won't install for me and I can't find anyone else on the net with my problem. My setup is XP SP 2. ------perl -v: This is perl, v5.6.1 built for MSWin32-x86-multi-thread (with 1 registered patch, see perl -V for more detail) Copyright 1987-2001, Larry Wall Binary build 635 based on sources provided by ActiveState Corp. http://www.ActiveState.com Built 21:04:21 Feb 25 2003 -----Error (perl Build.PL works fine): C:\Documents and Settings\Administrator\Desktop\firebird incoming\Module-Bu= ild-0 .28.tar\Module-Build-0.28>Build Use of uninitialized value in pattern match (m//) at c:/work/Perl/lib/File/= Spec/ Win32.pm line 72. Use of uninitialized value in pattern match (m//) at c:/work/Perl/lib/File/= Spec/ Win32.pm line 72. Use of uninitialized value in pattern match (m//) at c:/work/Perl/lib/File/= Spec/ Win32.pm line 140. mkdir blib\binhtml\bin\C:.: Invalid argument at lib/Module/Build/Base.pm li= ne 25 29 Any assistance would be appreciated! Please let me know if more information is required. Ben |
From: Chris D. <ch...@cl...> - 2006-05-12 14:06:19
|
[Sorry to post this to the list. RT seems to be down right now...] I just tried installing 0.28 via CPANPLUS on a Mac 10.4 box where I had 0.27_06 installed before and got the following errors: t/ppm............. * ERROR: Configuration was initially created with Module::Build version '0.2706', but we are now using version '0.28'. Please re-run the Build.PL or Makefile.PL script. t/ppm.............dubious Test returned status 2 (wstat 512, 0x200) t/xs.............. * ERROR: Configuration was initially created with Module::Build version '0.2706', but we are now using version '0.28'. Please re-run the Build.PL or Makefile.PL script. t/xs..............dubious Test returned status 255 (wstat 65280, 0xff00) The issue seems to be that Build.PL shifts 'lib' and 't/lib' onto the @INC stack as relative paths. Then when some of the regression tests chdir, they fail to find the 0.28 .pm files and instead find the old ones. The following patch works for me by forcing the @INC additions to be absolute instead of relative. Chris --- /Users/chris/Work/Module-Build/Build.PL 2006-01-20 08:29:14.000000000 -0600 +++ Build.PL 2006-05-12 08:58:15.000000000 -0500 @@ -3,19 +3,15 @@ # On some platforms (*ahem*, MacPerl 5.6.1) "use lib qw(lib);" doesn't # find the local "lib" directory, so we use File::Spec to do it properly. use File::Spec 0.82; -use lib File::Spec->catdir('lib'); # use our self to install -use lib File::Spec->catdir('t', 'lib'); # use bundled Test::More +use lib File::Spec->catdir(File::Spec->curdir, 'lib'); # use our self to install +use lib File::Spec->catdir(File::Spec->curdir, 't', 'lib'); # use bundled Test::More # We use Module::Build to test & install itself. use Module::Build; -- Chris Dolan, Software Developer, Clotho Advanced Media Inc. 608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703 vCard: http://www.chrisdolan.net/ChrisDolan.vcf Clotho Advanced Media, Inc. - Creators of MediaLandscape Software (http://www.media-landscape.com/) and partners in the revolutionary Croquet project (http://www.opencroquet.org/) |
From: Stephen A. <spa...@gm...> - 2006-05-12 04:50:57
|
Hi, I wrote Module::Build::YAML. I offer these patches. Both of the previously mentioned broken YAML files were a result of embedded newlines. I opted to tackle newlines and all of the other special characters which I could find which YAML considers special. I think this version will be quite an improvement in terms of robustness in the presence of "odd" characters in the scalar values. I patched lib/Module/Build/YAML.pm t/mbyaml.t The "svn diff" is below. I also attach a tar.gz of the two full files in ca= se I did the patch wrong. Stephen spadkins@pompeii:/usr/rubicon/spadkins/src/app/Module-Build> svn diff Index: t/mbyaml.t =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- t/mbyaml.t (revision 6288) +++ t/mbyaml.t (working copy) @@ -9,9 +9,12 @@ $dir =3D "t" if (-d "t"); { - use_ok("Module::Build::YAML"); - my ($expected, $got, $var); - $var =3D { + use_ok("Module::Build::YAML"); + my ($expected, $got, $var); + ########################################################## + # Test a typical-looking Module::Build structure (alphabetized) + ########################################################## + $var =3D { 'resources' =3D> { 'license' =3D> 'http://opensource.org/licenses/artistic-license.php' }, @@ -43,11 +46,11 @@ }, 'abstract' =3D> 'A framework for building dynamic widgets or full applications in Javascript' }; - $expected =3D <<EOF; + $expected =3D <<'EOF'; --- abstract: A framework for building dynamic widgets or full applications in Javascript author: - - '"Stephen Adkins" <spadkins\@gmail.com>' + - '"Stephen Adkins" <spa...@gm...>' build_requires: App::Build: 0 File::Spec: 0 @@ -72,12 +75,15 @@ $got =3D &Module::Build::YAML::Dump($var); is($got, $expected, "Dump(): single deep hash"); - $expected =3D <<EOF; + ########################################################## + # Test a typical-looking Module::Build structure (ordered) + ########################################################## + $expected =3D <<'EOF'; --- name: js-app version: 0.13 author: - - '"Stephen Adkins" <spadkins\@gmail.com>' + - '"Stephen Adkins" <spa...@gm...>' abstract: A framework for building dynamic widgets or full applications in Javascript license: lgpl resources: @@ -102,13 +108,16 @@ $got =3D &Module::Build::YAML::Dump($var); is($got, $expected, "Dump(): single deep hash, ordered"); + ########################################################## + # Test that an array turns into multiple documents + ########################################################## $var =3D [ "e", 2.71828, [ "pi", "is", 3.1416 ], { fun =3D> "under_sun", 6 =3D> undef, "more", undef }, ]; - $expected =3D <<EOF; + $expected =3D <<'EOF'; --- e --- @@ -118,14 +127,17 @@ - is - 3.1416 --- -6: "" +6: ~ fun: under_sun -more: "" +more: ~ EOF $got =3D &Module::Build::YAML::Dump(@$var); is($got, $expected, "Dump(): multiple, various"); - $expected =3D <<EOF; + ########################################################## + # Test that a single array ref turns into one document + ########################################################## + $expected =3D <<'EOF'; --- - e - 2.71828 @@ -134,16 +146,115 @@ - is - 3.1416 - - 6: "" + 6: ~ fun: under_sun - more: "" + more: ~ EOF $got =3D &Module::Build::YAML::Dump($var); is($got, $expected, "Dump(): single array of various"); + ########################################################## + # Test Object-Oriented Flavor of the API + ########################################################## my $y =3D Module::Build::YAML->new(); $got =3D $y->Dump($var); is($got, $expected, "Dump(): single array of various (OO)"); + + ########################################################## + # Test Quoting Conditions (newlines, quotes, tildas, undefs) + ########################################################## + $var =3D { + 'foo01' =3D> '`~!@#$%^&*()_+-=3D{}|[]\\;\':",./?<> +<nl>', + 'foo02' =3D> '~!@#$%^&*()_+-=3D{}|[]\\;:,./<>?', + 'foo03' =3D> undef, + 'foo04' =3D> '~', + }; + $expected =3D <<'EOF'; +--- +foo01: "`~!@#$%^&*()_+-=3D{}|[]\;':\",./?<>\n<nl>" +foo02: "~!@#$%^&*()_+-=3D{}|[]\;:,./<>?" +foo03: ~ +foo04: "~" +EOF + $got =3D &Module::Build::YAML::Dump($var); + is($got, $expected, "Dump(): tricky embedded characters"); + + $var =3D { + 'foo10' =3D> undef, + 'foo40' =3D> '!', + 'foo41' =3D> '@', + 'foo42' =3D> '#', + 'foo43' =3D> '$', + 'foo44' =3D> '%', + 'foo45' =3D> '^', + 'foo47' =3D> '&', + 'foo48' =3D> '*', + 'foo49' =3D> '(', + 'foo50' =3D> ')', + 'foo51' =3D> '_', + 'foo52' =3D> '+', + 'foo53' =3D> '-', + 'foo54' =3D> '=3D', + 'foo55' =3D> '{', + 'foo56' =3D> '}', + 'foo57' =3D> '|', + 'foo58' =3D> '[', + 'foo59' =3D> ']', + 'foo60' =3D> '\\', + 'foo61' =3D> ';', + 'foo62' =3D> ':', + 'foo63' =3D> ',', + 'foo64' =3D> '.', + 'foo65' =3D> '/', + 'foo66' =3D> '<', + 'foo67' =3D> '>', + 'foo68' =3D> '?', + 'foo69' =3D> '\'', + 'foo70' =3D> '"', + 'foo71' =3D> '`', + 'foo72' =3D> ' +', + }; + $expected =3D <<'EOF'; +--- +foo10: ~ +foo40: "!" +foo41: '@' +foo42: "#" +foo43: $ +foo44: % +foo45: "^" +foo47: "&" +foo48: "*" +foo49: "(" +foo50: ")" +foo51: _ +foo52: + +foo53: - +foo54: =3D +foo55: "{" +foo56: "}" +foo57: "|" +foo58: "[" +foo59: "]" +foo60: \ +foo61: ; +foo62: : +foo63: , +foo64: . +foo65: / +foo66: '<' +foo67: '>' +foo68: "?" +foo69: "'" +foo70: '"' +foo71: "`" +foo72: "\n" +EOF + $got =3D &Module::Build::YAML::Dump($var); + is($got, $expected, "Dump(): tricky embedded characters (singles)"); + } Index: lib/Module/Build/YAML.pm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lib/Module/Build/YAML.pm (revision 6288) +++ lib/Module/Build/YAML.pm (working copy) @@ -102,26 +102,31 @@ } sub _yaml_value { - # XXX doesn't handle embedded newlines my ($value) =3D @_; - # undefs and empty strings will become empty strings - if (! defined $value || $value eq "") { + # undefs become ~ + if (! defined $value) { + return("~"); + } + # empty strings will become empty strings + elsif (! defined $value || $value eq "") { return('""'); } + # quote and escape strings with special values + elsif ($value =3D~ /["'`~\n!\@\#^\&\*\(\)\{\}\[\]\|<>\?]/) { + if ($value !~ /['`~\n!\#^\&\*\(\)\{\}\[\]\|\?]/) { # nothing but " or @ or < or > (email addresses) + return("'" . $value . "'"); + } + else { + $value =3D~ s/\n/\\n/g; # handle embedded newlines + $value =3D~ s/"/\\"/g; # handle embedded quotes + return('"' . $value . '"'); + } + } # allow simple scalars (without embedded quote chars) to be unquoted - elsif ($value !~ /["'\\]/) { + # (includes $%_+=3D-\;:,./) + else { return($value); } - # strings without double-quotes get double-quoted - elsif ($value !~ /\"/) { - $value =3D~ s{\\}{\\\\}g; - return qq{"$value"}; - } - # other strings get single-quoted - else { - $value =3D~ s{([\\'])}{\\$1}g; - return qq{'$value'}; - } } 1; =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D On 5/11/06, Johan Vromans <jvr...@sq...> wrote: > and...@fr... (Andreas J. Koenig) writes: > > >>>>>> On Wed, 10 May 2006 08:40:33 +0200, andreas.koenig.gmwojprw@franz.= ak.mind.de (Andreas J. Koenig) said: > > > > > This seems to be a bug in Module::Build that is still there in 0.28= . > > > > Another case where Module::Build without YAML fails is PHILCROW/Gantry-= 3.30.tar.gz > > > > M:B generates a YAML file that contains > > > > ----snip---- > > author: > > - Tim Keefer <tk...@gm...> > > Phil Crow <phi...@ya...> > > ----snip---- > > In the current Module::Build::YAML, line 105, read: > > # XXX doesn't handle embedded newlines > > Shouldn't be so hard to fix... > > -- Johan > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job ea= sier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronim= o > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > _______________________________________________ > Module-build-general mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/module-build-general > |
From: Randy W. S. <ml...@th...> - 2006-05-12 00:12:38
|
Ron Savage wrote: > Hi Folks > > Since upgrading from V 0.2611 processing of a bin/ directory has changed. > > I create a distribution directory for one of my own modules, and in that dir > wish to create a distro, with: (%1 = UnitEval-Reporter, %2 = 1.09) > > cd \perl-modules\%1-%2 > rd /q /s x86 > md x86 > perl Build.PL > perl Build > etc > > The current directory contains the bin/ dir which contains 12 *.bat files. > > Log extract (sorry about the wrap. I've separated the lines): > -----><8----- > -----><8----- > > Here's what I think is happening: The 12 *.bat files I copy into the > distribution dir do not have the read-only bit set, but after Module::Build > copies them to blib\script\ it sets the read-only bit, and then tries to create > a Perl wrapper around the contents of each file, and dies trying to do an in > situ update of the read-only file. Thanks. This should now be fixed (along with added tests) in revision 6288. Randy. |
From: Johan V. <jvr...@sq...> - 2006-05-11 10:59:49
|
and...@fr... (Andreas J. Koenig) writes: >>>>>> On Wed, 10 May 2006 08:40:33 +0200, and...@fr... (Andreas J. Koenig) said: > > > This seems to be a bug in Module::Build that is still there in 0.28. > > Another case where Module::Build without YAML fails is PHILCROW/Gantry-3.30.tar.gz > > M:B generates a YAML file that contains > > ----snip---- > author: > - Tim Keefer <tk...@gm...> > Phil Crow <phi...@ya...> > ----snip---- In the current Module::Build::YAML, line 105, read: # XXX doesn't handle embedded newlines Shouldn't be so hard to fix... -- Johan |
From: <and...@fr...> - 2006-05-10 20:05:10
|
>>>>> On Wed, 10 May 2006 08:40:33 +0200, and...@fr... (Andreas J. Koenig) said: > This seems to be a bug in Module::Build that is still there in 0.28. Another case where Module::Build without YAML fails is PHILCROW/Gantry-3.30.tar.gz M:B generates a YAML file that contains ----snip---- author: - Tim Keefer <tk...@gm...> Phil Crow <phi...@ya...> ----snip---- and YAML complains about this one with % perl -le 'use YAML 0.58; YAML::LoadFile("META.yml")' YAML Error: Invalid element in map Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT Line: 6 Document: 1 at /usr/local/perl-5.8.7/lib/site_perl/5.8.7/YAML.pm line 60 -- andreas |
From: <and...@fr...> - 2006-05-10 06:41:22
|
This seems to be a bug in Module::Build that is still there in 0.28. Get the distro DJO/DBIx-Class-FormTools-0.000003.tar.gz, hide your YAML from perl and run perl Build.PL ./Build distmeta The resulting META.yml contains (among others) the following lines: ----snip---- abstract: Utility module for building forms with multiple related L<DBIx::Class> objects. ----snip---- This cannot be parsed by YAML with this error message: YAML Error: Invalid element in map Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT Line: 7 Document: 1 -- andreas |
From: chromatic <chr...@wg...> - 2006-05-09 18:32:54
|
On Tuesday 09 May 2006 01:04, Randy W. Sims wrote: > I think we should also test for these types of failures for the author > during 'disttest' or at some other point where the author can correct > the problem before the user sees it. Any preference as to where to put > such tests? I have a small M::B subclass (used in the SUPER distribution, for example) that runs the tests in t/developer only during disttest. -- c |
From: Ken W. <ke...@ma...> - 2006-05-09 13:32:38
|
On May 9, 2006, at 3:04 AM, Randy W. Sims wrote: > [ X-List-Archive: <http://nntp.perl.org/group/perl.perl5.porters/ > 112653> ] > > Rafael Garcia-Suarez wrote: >> On 07/05/06, via RT Eric R. Meyers <per...@pe...> wrote: >>> Perl Pod::Html error stops CPAN make Pod::Readme >>> >>> Abstract: >>> ./Build: blib/lib/Pod/Readme.pm: unexpected =item directive in >>> paragraph 38. >>> ignoring. >>> Use of uninitialized value in string ne at /usr/lib/perl5/5.8.8/ >>> Pod/Html.pm >>> line 1281. >>> Unmatched begin/end at chunk 40 >>> ./Build -- NOT OK >> I'd say the problem is with Module::Build, which should probably >> proceed if pod2html can't build HTML docs. Anyway this is a M::B bug, >> not a Pod::Html one. The original POD document is actually malformed. > > I guess I'm not one for failing silently. What should be the > correct behavior here? > > 1) Silently fail. Install everything but html docs. > 2) Silently fail. Install everything including all the html docs > except the one that fails. > 3) Fail completely. > > The problem with failing silently or even emitting a warning is > that it will disappear amoung other output when installing from > CPAN.pm or similar, giving no clue to the user that installation is > "incomplete". I agree. If the user has their system set up to build things a certain way (i.e. with HTML pages), and we can't do that, we need to fail. I don't know of any build system that will just give up and proceed without one of its targets. We could indeed improve the failure message, though, as long as we don't obscure the original cause. -Ken |
From: Randy W. S. <ml...@th...> - 2006-05-09 08:04:50
|
[ X-List-Archive: <http://nntp.perl.org/group/perl.perl5.porters/112653> ] Rafael Garcia-Suarez wrote: > On 07/05/06, via RT Eric R. Meyers <per...@pe...> wrote: > >> Perl Pod::Html error stops CPAN make Pod::Readme >> >> Abstract: >> ./Build: blib/lib/Pod/Readme.pm: unexpected =item directive in >> paragraph 38. >> ignoring. >> Use of uninitialized value in string ne at >> /usr/lib/perl5/5.8.8/Pod/Html.pm >> line 1281. >> Unmatched begin/end at chunk 40 >> ./Build -- NOT OK > > > I'd say the problem is with Module::Build, which should probably > proceed if pod2html can't build HTML docs. Anyway this is a M::B bug, > not a Pod::Html one. The original POD document is actually malformed. I guess I'm not one for failing silently. What should be the correct behavior here? 1) Silently fail. Install everything but html docs. 2) Silently fail. Install everything including all the html docs except the one that fails. 3) Fail completely. The problem with failing silently or even emitting a warning is that it will disappear amoung other output when installing from CPAN.pm or similar, giving no clue to the user that installation is "incomplete". Maybe we should die with a message saying how to run the build to skip the generation of html docs, so the user can try again without the docs? I think we should also test for these types of failures for the author during 'disttest' or at some other point where the author can correct the problem before the user sees it. Any preference as to where to put such tests? Randy. |
From: Randy W. S. <ml...@th...> - 2006-05-09 07:44:08
|
Steve Peters wrote: > On Thu, May 04, 2006 at 05:54:57PM -0400, Randy W. Sims wrote: > >>Steve Peters wrote: >> >>>>Change 28045 by stevep@stevep-kirk on 2006/05/02 02:47:43 >>>> >>>> Escape prompts with #'s to avoid causing tests to fail from >>>> the unexpected output. >>>> >>> >>>Since the above change there's been no change in the results, and, for >>>me at least, no change in my inability to replicate this problem. >>>Interestingly enough, this error didn't occur with my Linux icc smoke. >>> >>>Is anyone else able to replicate this problem at all? >> >>Sorry, I've been away from my email for the last couple of days, and I >>haven't been watching the smokes. I'll try to take a look at this >>tonight and see if I can reproduce it on any of my other systems (I >>didn't see it when testing on Ubuntu linux). >> > > > I just figured out the problem a few moments ago and have committed the > fix to bleadperl. The problem was that the test depended on STDIN > input, but when running a smoke through cron, STDIN is closed. The > change skips the failing tests if "fileno(STDIN)" returns undef. > > Can you all please apply this patch back to Module::Build? Thanks for tracking this down. I don't think it would have occured to me that it was only failing when running under cron where STDIN is closed. I took a slightly different approach to fixing it which will allow the tests to be run even if STDIN is closed rather than skipping them. I'll post a patch to sync when we make the next point release. Randy. |
From: Ron S. <ro...@sa...> - 2006-05-09 01:39:49
|
Hi Folks Since upgrading from V 0.2611 processing of a bin/ directory has changed. I create a distribution directory for one of my own modules, and in that dir wish to create a distro, with: (%1 = UnitEval-Reporter, %2 = 1.09) cd \perl-modules\%1-%2 rd /q /s x86 md x86 perl Build.PL perl Build etc The current directory contains the bin/ dir which contains 12 *.bat files. Log extract (sorry about the wrap. I've separated the lines): -----><8----- D:\perl-modules\UnitEval-Reporter-1.09>perl Build lib\UnitEval\Reporter\AdminPeriod.pm -> blib\lib\UnitEval\Reporter\AdminPeriod.pm [snip more of same] D:\perl-modules\UnitEval-Reporter-1.09\bin\backup-uer-public-2005-1-images.bat -> blib\script\backup-uer-public-2005-1-images.bat WARNING: Unable to convert file 'blib\script\backup-uer-public-2005-1-images.bat' to an executable script: Can't open blib\script\backup-uer-public-2005-1-images.bat: Permission denied at d:/Perl/site/lib/Module/Build/Platform/Windows.pm line 147. [snip 11 more of same] Manifying blib\lib/UnitEval/Reporter/Report_14.pm -> blib\libdoc\UnitEval.Reporter.Report_14.3 [snip more of same] -----><8----- Here's what I think is happening: The 12 *.bat files I copy into the distribution dir do not have the read-only bit set, but after Module::Build copies them to blib\script\ it sets the read-only bit, and then tries to create a Perl wrapper around the contents of each file, and dies trying to do an in situ update of the read-only file. -- Ron Savage ro...@sa... http://savage.net.au/index.html |
From: Randy W. S. <ml...@th...> - 2006-05-05 14:22:38
|
Randy W. Sims wrote: > Steve Peters wrote: > >>> Change 28045 by stevep@stevep-kirk on 2006/05/02 02:47:43 >>> >>> Escape prompts with #'s to avoid causing tests to fail from >>> the unexpected output. >>> >> >> Since the above change there's been no change in the results, and, for >> me at least, no change in my inability to replicate this problem. >> Interestingly enough, this error didn't occur with my Linux icc smoke. >> >> Is anyone else able to replicate this problem at all? > > > Sorry, I've been away from my email for the last couple of days, and I > haven't been watching the smokes. I'll try to take a look at this > tonight and see if I can reproduce it on any of my other systems (I > didn't see it when testing on Ubuntu linux). No luck reproducing this yet. I've tried manually and by setting up a minimal smoke config which should have been enough looking at the other reports. I'll try again running a full smoke. Attached is a patch which /may/ eliminate the noise and help localize the problem, but until I can reproduce it, I'm shooting in the dark. Randy. |
From: Randy W. S. <ml...@th...> - 2006-05-04 21:55:01
|
Steve Peters wrote: >> Change 28045 by stevep@stevep-kirk on 2006/05/02 02:47:43 >> >> Escape prompts with #'s to avoid causing tests to fail from >> the unexpected output. >> > > Since the above change there's been no change in the results, and, for > me at least, no change in my inability to replicate this problem. > Interestingly enough, this error didn't occur with my Linux icc smoke. > > Is anyone else able to replicate this problem at all? Sorry, I've been away from my email for the last couple of days, and I haven't been watching the smokes. I'll try to take a look at this tonight and see if I can reproduce it on any of my other systems (I didn't see it when testing on Ubuntu linux). Randy. |
From: Chris D. <ch...@cl...> - 2006-05-04 15:31:28
|
On May 4, 2006, at 9:57 AM, Johan Vromans wrote: > Chris Dolan <ch...@cl...> writes: > >> With a popular website like perlmonks or annocpan or cpanratings, you >> can be guaranteed that *someone* is watching the RSS feed and will >> notice your anguished entreaties, thereby increasing the likelihood >> you'll get a response. > > And then? > If you want something to change, you'll need to contact the author, or > start a module takeover. > > -- Johan There are more alternatives, depending on the scenario. If it's a small bug that the author won't fix or a gotcha the author won't document, then one can post a workaround or alert on annocpan.org. One can also post recommended alternative modules (possibly even a fork?) on annocpan.org if the author didn't provide a good "SEE ALSO" section. If the module is hopelessly broken or the author is completely unresponsive for a long time, then yes you are right that more extreme measures may be needed. But, certainly none of this pertains to M::B, led by the hyper- responsive Ken Williams, right. :-) This thread all started when a member of the M::B community spotted a poorly-specified problem posted on cpanratings instead of RT. In this case, the @authors were more responsive than the reporter! Chris -- Chris Dolan, Software Developer, Clotho Advanced Media Inc. 608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703 vCard: http://www.chrisdolan.net/ChrisDolan.vcf Clotho Advanced Media, Inc. - Creators of MediaLandscape Software (http://www.media-landscape.com/) and partners in the revolutionary Croquet project (http://www.opencroquet.org/) |
From: Johan V. <jvr...@sq...> - 2006-05-04 15:19:30
|
Adrian Howard <ad...@qu...> writes: > There are RSS feeds available. [...] No per-author feeds though > which is rather annoying.... Precisely. > That said I'm sure patches would be welcome - see http:// > cpanratings.perl.org/about.html I've sent some suggestions to ask. -- Johan |
From: Johan V. <jvr...@sq...> - 2006-05-04 14:57:35
|
Chris Dolan <ch...@cl...> writes: > With a popular website like perlmonks or annocpan or cpanratings, you > can be guaranteed that *someone* is watching the RSS feed and will > notice your anguished entreaties, thereby increasing the likelihood > you'll get a response. And then? If you want something to change, you'll need to contact the author, or start a module takeover. -- Johan |
From: Chris D. <ch...@cl...> - 2006-05-04 13:39:21
|
On May 4, 2006, at 3:23 AM, Johan Vromans wrote: > But still, I'd prefer users to discuss things with the appropriate > module authors instead of behind our backs. A significant issue is that there are a lot of unresponsive CPAN authors (often understandable since it's volunteer work, and sometimes an ancient module). A user can rarely tell in advance which authors will respond in five minutes and which won't respond even after three or four emails over the course of a year. This applies both to email and to RT. Even popular and talented authors like Schwern are known to be unresponsive to critical issues. With a popular website like perlmonks or annocpan or cpanratings, you can be guaranteed that *someone* is watching the RSS feed and will notice your anguished entreaties, thereby increasing the likelihood you'll get a response. I agree that RT is the right place to post bugs and use it heavily myself, but squeaky wheels do get greased via the other websites. Chris -- Chris Dolan, Software Developer, Clotho Advanced Media Inc. 608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703 vCard: http://www.chrisdolan.net/ChrisDolan.vcf Clotho Advanced Media, Inc. - Creators of MediaLandscape Software (http://www.media-landscape.com/) and partners in the revolutionary Croquet project (http://www.opencroquet.org/) |
From: Adrian H. <ad...@qu...> - 2006-05-04 10:45:14
|
On 4 May 2006, at 09:23, Johan Vromans wrote: > David Wheeler <da...@ki...> writes: [snip] >> But at least with AnnoCPAN you should get an email when someone >> annotates your documentation. I did for one of my modules, and as a >> result updated the docs for the next release. > > A similar mechanism seems to be missing for CPANRATINGS. There are RSS feeds available. That's how I keep notified of comments on my modules. No per-author feeds though which is rather annoying.... > But still, I'd prefer users to discuss things with the appropriate > module authors instead of behind our backs. I think that calling a public web site "behind our backs" a little OTT. It is annoying that there isn't a way to get easier notifications though. That said I'm sure patches would be welcome - see http:// cpanratings.perl.org/about.html Adrian |