module-build-checkins Mailing List for Module::Build (Page 41)
Status: Beta
Brought to you by:
kwilliams
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(82) |
Dec
(58) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(49) |
Feb
(57) |
Mar
(49) |
Apr
(49) |
May
(2) |
Jun
(147) |
Jul
(60) |
Aug
(55) |
Sep
(51) |
Oct
(68) |
Nov
(61) |
Dec
(44) |
2006 |
Jan
(27) |
Feb
(38) |
Mar
(89) |
Apr
(31) |
May
(17) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Ken W. <kwi...@us...> - 2004-11-15 19:58:57
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13218/t Modified Files: basic.t Log Message: Integrate from bugfix branch Index: basic.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/basic.t,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** basic.t 15 Nov 2004 02:56:28 -0000 1.32 --- basic.t 15 Nov 2004 19:58:42 -0000 1.33 *************** *** 3,7 **** use strict; use Test; ! BEGIN { plan tests => 37 } use Module::Build; ok(1); --- 3,7 ---- use strict; use Test; ! BEGIN { plan tests => 41 } use Module::Build; ok(1); *************** *** 19,28 **** # Test object creation { ! my $build = new Module::Build ! ( ! module_name => 'ModuleBuildOne', ! ); ok $build; ok $build->module_name, 'ModuleBuildOne'; } --- 19,31 ---- # Test object creation { ! my $build = new Module::Build( module_name => 'ModuleBuildOne' ); ok $build; ok $build->module_name, 'ModuleBuildOne'; + ok $build->dist_name, 'ModuleBuildOne'; + + $build = Module::Build->new( dist_name => 'ModuleBuildOne', dist_version => 7 ); + ok $build; + ok $build->module_name, ''; # Make sure it's defined + ok $build->dist_name, 'ModuleBuildOne'; } |
From: Ken W. <kwi...@us...> - 2004-11-15 19:58:57
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13218/lib/Module/Build Modified Files: Base.pm Log Message: Integrate from bugfix branch Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.347 retrieving revision 1.348 diff -C2 -d -r1.347 -r1.348 *** Base.pm 15 Nov 2004 18:38:50 -0000 1.347 --- Base.pm 15 Nov 2004 19:58:26 -0000 1.348 *************** *** 84,87 **** --- 84,88 ---- config => {%Config, %$config}, properties => { + module_name => '', build_script => 'Build', base_dir => $package->cwd, *************** *** 539,544 **** return $p->{dist_version} if exists $p->{dist_version}; ! if (exists $p->{module_name}) { ! $p->{dist_version_from} ||= join( '/', 'lib', split '::', $p->{module_name} ) . '.pm'; } --- 540,545 ---- return $p->{dist_version} if exists $p->{dist_version}; ! if ($self->module_name) { ! $p->{dist_version_from} ||= join( '/', 'lib', split '::', $self->module_name ) . '.pm'; } |
From: Ken W. <kwi...@us...> - 2004-11-15 19:51:20
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11627/t Modified Files: Tag: release-0_26_branch basic.t Log Message: Eliminate undef-var warning on module_name Index: basic.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/basic.t,v retrieving revision 1.27.2.3 retrieving revision 1.27.2.4 diff -C2 -d -r1.27.2.3 -r1.27.2.4 *** basic.t 13 Nov 2004 15:07:10 -0000 1.27.2.3 --- basic.t 15 Nov 2004 19:51:10 -0000 1.27.2.4 *************** *** 3,7 **** use strict; use Test; ! BEGIN { plan tests => 37 } use Module::Build; ok(1); --- 3,7 ---- use strict; use Test; ! BEGIN { plan tests => 41 } use Module::Build; ok(1); *************** *** 19,28 **** # Test object creation { ! my $build = new Module::Build ! ( ! module_name => 'ModuleBuildOne', ! ); ok $build; ok $build->module_name, 'ModuleBuildOne'; } --- 19,31 ---- # Test object creation { ! my $build = new Module::Build( module_name => 'ModuleBuildOne' ); ok $build; ok $build->module_name, 'ModuleBuildOne'; + ok $build->dist_name, 'ModuleBuildOne'; + + $build = Module::Build->new( dist_name => 'ModuleBuildOne', dist_version => 7 ); + ok $build; + ok $build->module_name, ''; # Make sure it's defined + ok $build->dist_name, 'ModuleBuildOne'; } |
From: Ken W. <kwi...@us...> - 2004-11-15 19:51:19
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11627/lib/Module/Build Modified Files: Tag: release-0_26_branch Base.pm Log Message: Eliminate undef-var warning on module_name Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.340.2.1 retrieving revision 1.340.2.2 diff -C2 -d -r1.340.2.1 -r1.340.2.2 *** Base.pm 13 Oct 2004 18:56:45 -0000 1.340.2.1 --- Base.pm 15 Nov 2004 19:51:10 -0000 1.340.2.2 *************** *** 83,86 **** --- 83,87 ---- config => {%Config, %$config}, properties => { + module_name => '', build_script => 'Build', base_dir => $package->cwd, *************** *** 538,543 **** return $p->{dist_version} if exists $p->{dist_version}; ! if (exists $p->{module_name}) { ! $p->{dist_version_from} ||= join( '/', 'lib', split '::', $p->{module_name} ) . '.pm'; } --- 539,544 ---- return $p->{dist_version} if exists $p->{dist_version}; ! if ($self->module_name) { ! $p->{dist_version_from} ||= join( '/', 'lib', split '::', $self->module_name ) . '.pm'; } |
From: Ken W. <kwi...@us...> - 2004-11-15 19:51:18
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11627 Modified Files: Tag: release-0_26_branch Changes Log Message: Eliminate undef-var warning on module_name Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.299.2.7 retrieving revision 1.299.2.8 diff -C2 -d -r1.299.2.7 -r1.299.2.8 *** Changes 15 Nov 2004 16:28:31 -0000 1.299.2.7 --- Changes 15 Nov 2004 19:51:09 -0000 1.299.2.8 *************** *** 1,4 **** --- 1,10 ---- Revision history for Perl extension Module::Build. + 0.2604 + + - module_name() will now return '' instead of undef when module_name + is not set. This eliminates a couple uninitialized-value + warnings. [Suggested by Michael Schwern] + 0.2603 (Bug fix for 0.26) Mon Nov 15 10:28:00 CST 2004 |
From: Ken W. <kwi...@us...> - 2004-11-15 18:39:03
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27503/lib/Module/Build Modified Files: Base.pm Log Message: Make script_files a bit smarter Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.346 retrieving revision 1.347 diff -C2 -d -r1.346 -r1.347 *** Base.pm 15 Nov 2004 16:16:25 -0000 1.346 --- Base.pm 15 Nov 2004 18:38:50 -0000 1.347 *************** *** 12,15 **** --- 12,16 ---- use Data::Dumper (); use IO::File (); + use IO::Dir (); use Text::ParseWords (); *************** *** 2127,2130 **** --- 2128,2146 ---- } + sub _files_in { + my ($self, $dir) = @_; + return unless -d $dir; + + my $dh = IO::Dir->new( $dir ) or die "Can't read directory $dir: $!"; + + my @files; + while (defined (my $file = $dh->read)) { + my $full_path = File::Spec->catfile($dir, $file); + next if -d $full_path; + push @files, $full_path; + } + return @files; + } + sub script_files { my $self = shift; *************** *** 2132,2142 **** for ($self->{properties}{script_files}) { $_ = shift if @_; ! return unless $_; # Always coerce into a hash return $_ if UNIVERSAL::isa($_, 'HASH'); ! return $_ = {$_ => 1} unless ref(); ! return { map {$_,1} @$_ }; } } BEGIN { *scripts = \&script_files; } --- 2148,2164 ---- for ($self->{properties}{script_files}) { $_ = shift if @_; ! next unless $_; # Always coerce into a hash return $_ if UNIVERSAL::isa($_, 'HASH'); ! return $_ = { map {$_,1} @$_ } if UNIVERSAL::isa($_, 'ARRAY'); ! ! die "'script_files' must be a hashref, arrayref, or string" if ref(); ! ! return $_ = { map {$_,1} $self->_files_in( $_ ) } if -d $_; ! return $_ = {$_ => 1}; } + + return $_ = { map {$_,1} $self->_files_in( File::Spec->catdir( $self->base_dir, 'bin' ) ) }; } BEGIN { *scripts = \&script_files; } |
From: Ken W. <kwi...@us...> - 2004-11-15 18:39:03
|
Update of /cvsroot/module-build/Module-Build/lib/Module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27503/lib/Module Modified Files: Build.pm Log Message: Make script_files a bit smarter Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build.pm,v retrieving revision 1.168 retrieving revision 1.169 diff -C2 -d -r1.168 -r1.169 *** Build.pm 12 Nov 2004 02:34:31 -0000 1.168 --- Build.pm 15 Nov 2004 18:38:50 -0000 1.169 *************** *** 498,508 **** An optional parameter specifying a set of files that should be installed as executable perl scripts when the module is installed. ! May be given as an array reference of the files, or as a hash ! reference whose keys are the files (and whose values will currently be ! ignored). ! The default is to install no script files - in other words, there is ! no default location where Module::Build will look for script files to ! install. For backward compatibility, you may use the parameter C<scripts> --- 498,513 ---- An optional parameter specifying a set of files that should be installed as executable perl scripts when the module is installed. ! May be given as an array reference of the files, as a hash reference ! whose keys are the files (and whose values will currently be ignored), ! as a string specifying a directory to scan for scripts ! (nonrecursively), or as a string specifying the location of a single ! script to install. When scanning a directory for scripts, we don't do ! anything fancy - we just take every file that's not a directory. ! The default is to install any scripts found in a top-level F<bin/> ! directory in the distribution. Note that older versions of ! Module::Build did not search for scripts anywhere by default - if ! you've got a F<bin/> directory and you don't want it auto-scanned for ! scripts, then pass an empty value for the C<script_files> parameter. For backward compatibility, you may use the parameter C<scripts> |
From: Ken W. <kwi...@us...> - 2004-11-15 18:39:02
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27503 Modified Files: Build.PL Changes Log Message: Make script_files a bit smarter Index: Build.PL =================================================================== RCS file: /cvsroot/module-build/Module-Build/Build.PL,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** Build.PL 4 Nov 2004 01:42:40 -0000 1.47 --- Build.PL 15 Nov 2004 18:38:49 -0000 1.48 *************** *** 29,32 **** --- 29,33 ---- 'ExtUtils::Install' => 0, 'IO::File' => 0, + 'IO::Dir' => 0, 'Cwd' => 0, 'Text::ParseWords' => 0, Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.313 retrieving revision 1.314 diff -C2 -d -r1.313 -r1.314 *** Changes 12 Nov 2004 02:27:01 -0000 1.313 --- Changes 15 Nov 2004 18:38:49 -0000 1.314 *************** *** 30,33 **** --- 30,42 ---- build/install sequences. + - Have script_files default to everything in bin. I believe this is + the least surprising behavior. [Suggested by Michael Schwern] + + - If script_files is given a directory, consider each file in that + directory tree as a script to be installed. This avoids having to + remember to add to the script_files list every time you add a + program. [Suggested by Michael Schwern] + + 0.2602 (Bug fix for 0.26) Thu Nov 4 11:19:29 CST 2004 |
From: Ken W. <kwi...@us...> - 2004-11-15 16:33:26
|
Update of /cvsroot/module-build/Module-Build/t/Sample In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32140/t/Sample Removed Files: Tag: release-0_26_branch META.yml Log Message: No reason to track this generated file --- META.yml DELETED --- |
From: Ken W. <kwi...@us...> - 2004-11-15 16:32:04
|
Update of /cvsroot/module-build/Module-Build/t/Sample In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31762 Added Files: Tag: release-0_26_branch .cvsignore Log Message: --- NEW FILE: .cvsignore --- META.yml Build _build |
From: Ken W. <kwi...@us...> - 2004-11-15 16:28:42
|
Update of /cvsroot/module-build/Module-Build/lib/Module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31022/lib/Module Modified Files: Tag: release-0_26_branch Build.pm Log Message: Version bump Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build.pm,v retrieving revision 1.164.2.3 retrieving revision 1.164.2.4 diff -C2 -d -r1.164.2.3 -r1.164.2.4 *** Build.pm 12 Nov 2004 02:28:07 -0000 1.164.2.3 --- Build.pm 15 Nov 2004 16:28:30 -0000 1.164.2.4 *************** *** 16,20 **** use vars qw($VERSION @ISA); @ISA = qw(Module::Build::Base); ! $VERSION = '0.2602'; $VERSION = eval $VERSION; --- 16,20 ---- use vars qw($VERSION @ISA); @ISA = qw(Module::Build::Base); ! $VERSION = '0.2603'; $VERSION = eval $VERSION; |
From: Ken W. <kwi...@us...> - 2004-11-15 16:28:42
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31022 Modified Files: Tag: release-0_26_branch Changes Log Message: Version bump Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.299.2.6 retrieving revision 1.299.2.7 diff -C2 -d -r1.299.2.6 -r1.299.2.7 *** Changes 13 Nov 2004 15:08:24 -0000 1.299.2.6 --- Changes 15 Nov 2004 16:28:31 -0000 1.299.2.7 *************** *** 1,5 **** Revision history for Perl extension Module::Build. ! 0.2603 (Bug fix for 0.26) - Added documentation for the new_from_context() method. --- 1,5 ---- Revision history for Perl extension Module::Build. ! 0.2603 (Bug fix for 0.26) Mon Nov 15 10:28:00 CST 2004 - Added documentation for the new_from_context() method. |
From: Ken W. <kwi...@us...> - 2004-11-15 16:16:34
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28734/lib/Module/Build Modified Files: Base.pm Log Message: Need module_name on some platforms for linking Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.345 retrieving revision 1.346 diff -C2 -d -r1.345 -r1.346 *** Base.pm 4 Nov 2004 01:59:39 -0000 1.345 --- Base.pm 15 Nov 2004 16:16:25 -0000 1.346 *************** *** 2470,2474 **** return $lib_file if $self->up_to_date([$obj_file, @$objects], $lib_file); ! $b->link(objects => [$obj_file, @$objects], lib_file => $lib_file, extra_linker_flags => $p->{extra_linker_flags}); --- 2470,2475 ---- return $lib_file if $self->up_to_date([$obj_file, @$objects], $lib_file); ! $b->link(module_name => $self->module_name, ! objects => [$obj_file, @$objects], lib_file => $lib_file, extra_linker_flags => $p->{extra_linker_flags}); |
From: Ken W. <kwi...@us...> - 2004-11-15 02:56:37
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10357/t Modified Files: basic.t Added Files: ext.t Log Message: integrate split_like_shell() changes from bugfix branch Index: basic.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/basic.t,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** basic.t 14 Nov 2004 11:30:55 -0000 1.31 --- basic.t 15 Nov 2004 02:56:28 -0000 1.32 *************** *** 3,7 **** use strict; use Test; ! BEGIN { plan tests => 49 } use Module::Build; ok(1); --- 3,7 ---- use strict; use Test; ! BEGIN { plan tests => 37 } use Module::Build; ok(1); *************** *** 155,182 **** ok $build->dist_author->[0], 'Foo Meister <fo...@ex...>'; } - - # Test shell emulation stuff - { - my @words = Module::Build->split_like_shell(q{one t'wo th'ree f"o\"ur " "five" }); - ok @words, 4; - ok $words[0], 'one'; - ok $words[1], 'two three'; - ok $words[2], 'fo"ur '; - ok $words[3], 'five'; - - # Test whitespace handling - @words = Module::Build->split_like_shell(q{ foo bar }); - ok @words, 2; - ok $words[0], 'foo'; - ok $words[1], 'bar'; - - # Test some Win32-specific stuff - my $win = 'Module::Build::Platform::Windows'; - eval "use $win; 1" or die $@; - - @words = $win->split_like_shell(q{foo "\bar\baz" "b\"nai"}); - ok @words, 3; - ok $words[0], 'foo'; - ok $words[1], '\bar\baz'; - ok $words[2], 'b"nai'; - } --- 155,156 ---- --- NEW FILE: ext.t --- use strict; use Test; my @unix_splits = ( { q{one t'wo th'ree f"o\"ur " "five" } => [ 'one', 'two three', 'fo"ur ', 'five' ] }, { q{ foo bar } => [ 'foo', 'bar' ] }, ); my @win_splits = ( { 'a" "b\\c" "d' => [ 'a b\c d' ] }, { '"a b\\c d"' => [ 'a b\c d' ] }, { '"a b"\\"c d"' => [ 'a b"c', 'd' ] }, { '"a b"\\\\"c d"' => [ 'a b\c d' ] }, { '"a"\\"b" "a\\"b"' => [ 'a"b a"b' ] }, { '"a"\\\\"b" "a\\\\"b"' => [ 'a\b', 'a\b' ] }, { '"a"\\"b a\\"b"' => [ 'a"b', 'a"b' ] }, { 'a"\\"b" "a\\"b' => [ 'a"b', 'a"b' ] }, { 'a"\\"b" "a\\"b' => [ 'a"b', 'a"b' ] }, { 'a b' => [ 'a', 'b' ] }, { 'a"\\"b a\\"b' => [ 'a"b a"b' ] }, { '"a""b" "a"b"' => [ 'a"b ab' ] }, { '\\"a\\"' => [ '"a"' ] }, { '"a"" "b"' => [ 'a"', 'b' ] }, { 'a"b' => [ 'ab' ] }, { 'a""b' => [ 'ab' ] }, { 'a"""b' => [ 'a"b' ] }, { 'a""""b' => [ 'a"b' ] }, { 'a"""""b' => [ 'a"b' ] }, { 'a""""""b' => [ 'a""b' ] }, { '"a"b"' => [ 'ab' ] }, { '"a""b"' => [ 'a"b' ] }, { '"a"""b"' => [ 'a"b' ] }, { '"a""""b"' => [ 'a"b' ] }, { '"a"""""b"' => [ 'a""b' ] }, { '"a""""""b"' => [ 'a""b' ] }, { '' => [ ] }, { ' ' => [ ] }, { '""' => [ '' ] }, { '" "' => [ ' ' ] }, { '""a' => [ 'a' ] }, { '""a b' => [ 'a', 'b' ] }, { 'a""' => [ 'a' ] }, { 'a"" b' => [ 'a', 'b' ] }, { '"" a' => [ '', 'a' ] }, { 'a ""' => [ 'a', '' ] }, { 'a "" b' => [ 'a', '', 'b' ] }, { 'a " " b' => [ 'a', ' ', 'b' ] }, { 'a " b " c' => [ 'a', ' b ', 'c' ] }, ); plan tests => 1 + 2*@unix_splits + 2*@win_splits; use Module::Build; ok(1); use Module::Build::Platform::Unix; foreach my $test (@unix_splits) { do_split_tests('Module::Build::Platform::Unix', $test); } use Module::Build::Platform::Windows; foreach my $test (@win_splits) { do_split_tests('Module::Build::Platform::Windows', $test); } sub do_split_tests { my ($package, $test) = @_; my ($string, $expected) = %$test; my @result = $package->split_like_shell($string); ok( grep( {!defined()} @result ), # all defined 0, "'$string' result all defined" ); ok( join(' ', map "{$_}", @result), join(' ', map "{$_}", @$expected), join(' ', map "{$_}", @$expected) ); } |
From: Ken W. <kwi...@us...> - 2004-11-15 02:56:37
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build/Platform In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10357/lib/Module/Build/Platform Modified Files: Windows.pm Log Message: integrate split_like_shell() changes from bugfix branch Index: Windows.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Platform/Windows.pm,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Windows.pm 14 Nov 2004 11:38:38 -0000 1.19 --- Windows.pm 15 Nov 2004 02:56:28 -0000 1.20 *************** *** 69,84 **** sub split_like_shell { ! # In Win32 command shells, the backslashes in the string "\bar\baz" ! # should be preserved, because they often show up as parts of ! # pathnames. We double-up all these backslashes so shellwords() can ! # still be used (making sure to avoid backslash-quote pairs, which ! # should work the same as on Unix) ! (my $self, local $_) = @_; ! if (defined() && length() && !ref()) { ! s/\\(?!")/\\\\/g; } ! ! return $self->SUPER::split_like_shell($_); } --- 69,125 ---- sub split_like_shell { ! # As it turns out, Windows command-parsing is very different from ! # Unix command-parsing. Double-quotes mean different things, ! # backslashes don't necessarily mean escapes, and so on. So we ! # can't use Text::ParseWords::shellwords() to break a command string ! # into words. The algorithm below was bashed out by Randy and Ken ! # (mostly Randy), and there are a lot of regression tests, so we ! # should feel free to adjust if desired. ! (my $self, local $_) = @_; ! ! my @argv; ! return @argv unless defined() && length(); ! ! my $arg = ''; ! my( $i, $quote_mode ) = ( 0, 0 ); ! ! while ( $i < length() ) { ! ! my $ch = substr( $_, $i , 1 ); ! my $next_ch = substr( $_, $i+1, 1 ); ! ! if ( $ch eq '\\' && $next_ch eq '"' ) { ! $arg .= '"'; ! $i++; ! } elsif ( $ch eq '\\' && $next_ch eq '\\' ) { ! $arg .= '\\'; ! $i++; ! } elsif ( $ch eq '"' && $next_ch eq '"' && $quote_mode ) { ! $quote_mode = !$quote_mode; ! $arg .= '"'; ! $i++; ! } elsif ( $ch eq '"' && $next_ch eq '"' && !$quote_mode && ! ( $i + 2 == length() || ! substr( $_, $i + 2, 1 ) eq ' ' ) ! ) { # for cases like: a"" => [ 'a' ] ! push( @argv, $arg ); ! $arg = ''; ! $i += 2; ! } elsif ( $ch eq '"' ) { ! $quote_mode = !$quote_mode; ! } elsif ( $ch eq ' ' && !$quote_mode ) { ! push( @argv, $arg ) if $arg; ! $arg = ''; ! ++$i while substr( $_, $i + 1, 1 ) eq ' '; ! } else { ! $arg .= $ch; ! } ! ! $i++; } ! ! push( @argv, $arg ) if defined( $arg ) && length( $arg ); ! return @argv; } |
From: Randy W. S. <si...@us...> - 2004-11-14 11:38:48
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build/Platform In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29428 Modified Files: Windows.pm Log Message: reverted to 1.17 Index: Windows.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Platform/Windows.pm,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Windows.pm 13 Nov 2004 09:30:47 -0000 1.18 --- Windows.pm 14 Nov 2004 11:38:38 -0000 1.19 *************** *** 69,105 **** sub split_like_shell { ! my $self = shift; ! local $_ = shift; ! ! my @argv; ! return @argv unless defined; ! return @$_ if UNIVERSAL::isa($_, 'ARRAY'); ! s/^\s+|\s+$//g; ! return @argv unless length; ! ! push @argv, ''; ! my $quote_mode = 0; ! ! while (length()) { ! if ( s/^\\(\"|\\)// ) { ! $argv[-1] .= $1; ! ! } elsif ( $quote_mode && s/^""// ) { ! $quote_mode = 0; ! $argv[-1] .= '"'; ! ! } elsif ( s/^\"// ) { ! $quote_mode = !$quote_mode; ! ! } elsif ( !$quote_mode && s/^\s+// ) { ! push @argv, ''; ! } else { ! s/^(.)//; ! $argv[-1] .= $1; ! } } ! return @argv; } --- 69,84 ---- sub split_like_shell { ! # In Win32 command shells, the backslashes in the string "\bar\baz" ! # should be preserved, because they often show up as parts of ! # pathnames. We double-up all these backslashes so shellwords() can ! # still be used (making sure to avoid backslash-quote pairs, which ! # should work the same as on Unix) ! (my $self, local $_) = @_; ! if (defined() && length() && !ref()) { ! s/\\(?!")/\\\\/g; } ! return $self->SUPER::split_like_shell($_); } |
From: Randy W. S. <si...@us...> - 2004-11-14 11:31:38
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28243 Modified Files: common.pl Log Message: reverted to 1.9 Index: common.pl =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/common.pl,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** common.pl 13 Nov 2004 09:30:48 -0000 1.10 --- common.pl 14 Nov 2004 11:31:28 -0000 1.11 *************** *** 64,77 **** } - sub array_eq { # like Test::More::eq_array - my( $a1, $a2 ) = @_; - return 0 unless @$a1 == @$a2; - - for my $i ( 0..$#{$a1} ) { - return 0 unless $a1->[$i] eq $a2->[$i]; - } - - return 1; - } - 1; --- 64,66 ---- |
From: Randy W. S. <si...@us...> - 2004-11-14 11:31:04
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28142 Modified Files: basic.t Log Message: reverted to 1.29 Index: basic.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/basic.t,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** basic.t 13 Nov 2004 09:30:48 -0000 1.30 --- basic.t 14 Nov 2004 11:30:55 -0000 1.31 *************** *** 3,7 **** use strict; use Test; ! BEGIN { plan tests => 85 } use Module::Build; ok(1); --- 3,7 ---- use strict; use Test; ! BEGIN { plan tests => 49 } use Module::Build; ok(1); *************** *** 158,162 **** # Test shell emulation stuff { ! my @words = Module::Build::Base->split_like_shell(q{one t'wo th'ree f"o\"ur " "five" }); ok @words, 4; ok $words[0], 'one'; --- 158,162 ---- # Test shell emulation stuff { ! my @words = Module::Build->split_like_shell(q{one t'wo th'ree f"o\"ur " "five" }); ok @words, 4; ok $words[0], 'one'; *************** *** 174,226 **** my $win = 'Module::Build::Platform::Windows'; eval "use $win; 1" or die $@; ! ! my @tests = ( ! { 'a" "b\\c" "d' => [ 'a b\c d' ] }, ! { '"a b\\c d"' => [ 'a b\c d' ] }, ! { '"a b"\\"c d"' => [ 'a b"c', 'd' ] }, ! { '"a b"\\\\"c d"' => [ 'a b\c d' ] }, ! { '"a"\\"b" "a\\"b"' => [ 'a"b a"b' ] }, ! { '"a"\\\\"b" "a\\\\"b"' => [ 'a\b', 'a\b' ] }, ! { '"a"\\"b a\\"b"' => [ 'a"b', 'a"b' ] }, ! { 'a"\\"b" "a\\"b' => [ 'a"b', 'a"b' ] }, ! { 'a"\\"b" "a\\"b' => [ 'a"b', 'a"b' ] }, ! { 'a b' => [ 'a', 'b' ] }, ! { 'a"\\"b a\\"b' => [ 'a"b a"b' ] }, ! { '"a""b" "a"b"' => [ 'a"b ab' ] }, ! { '\\"a\\"' => [ '"a"' ] }, ! { '"a"" "b"' => [ 'a"', 'b' ] }, ! { 'a"b' => [ 'ab' ] }, ! { 'a""b' => [ 'ab' ] }, ! { 'a"""b' => [ 'a"b' ] }, ! { 'a""""b' => [ 'a"b' ] }, ! { 'a"""""b' => [ 'a"b' ] }, ! { 'a""""""b' => [ 'a""b' ] }, ! { '"a"b"' => [ 'ab' ] }, ! { '"a""b"' => [ 'a"b' ] }, ! { '"a"""b"' => [ 'a"b' ] }, ! { '"a""""b"' => [ 'a"b' ] }, ! { '"a"""""b"' => [ 'a""b' ] }, ! { '"a""""""b"' => [ 'a""b' ] }, ! { '' => [ ] }, ! { ' ' => [ ] }, ! { '""' => [ '' ] }, ! { '" "' => [ ' ' ] }, ! { '""a' => [ 'a' ] }, ! { '""a b' => [ 'a', 'b' ] }, ! { 'a""' => [ 'a' ] }, ! { 'a"" b' => [ 'a', 'b' ] }, ! { '"" a' => [ '', 'a' ] }, ! { 'a ""' => [ 'a', '' ] }, ! { 'a "" b' => [ 'a', '', 'b' ] }, ! { 'a " " b' => [ 'a', ' ', 'b' ] }, ! { 'a " b " c' => [ 'a', ' b ', 'c' ] }, ! { 'a "\\b\\c" "d\\"e"' => [ 'a', '\b\c', 'd"e' ] }, ! ); ! ! local $" = ', '; ! foreach my $test ( @tests ) { ! my( $string, $expected ) = %$test; ! my @result = $win->split_like_shell( $string ); ! ok array_eq( \@result, $expected ); ! } } --- 174,182 ---- my $win = 'Module::Build::Platform::Windows'; eval "use $win; 1" or die $@; ! ! @words = $win->split_like_shell(q{foo "\bar\baz" "b\"nai"}); ! ok @words, 3; ! ok $words[0], 'foo'; ! ok $words[1], '\bar\baz'; ! ok $words[2], 'b"nai'; } |
From: Ken W. <kwi...@us...> - 2004-11-13 15:08:34
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18825 Modified Files: Tag: release-0_26_branch Changes Log Message: Index: Changes =================================================================== RCS file: /cvsroot/module-build/Module-Build/Changes,v retrieving revision 1.299.2.5 retrieving revision 1.299.2.6 diff -C2 -d -r1.299.2.5 -r1.299.2.6 *** Changes 12 Nov 2004 02:28:06 -0000 1.299.2.5 --- Changes 13 Nov 2004 15:08:24 -0000 1.299.2.6 *************** *** 5,8 **** --- 5,11 ---- - Added documentation for the new_from_context() method. + - Completely rewrote the split_like_shell() method for the Windows + platform so it works like the command.com shell. [Randy Sims] + 0.2602 (Bug fix for 0.26) Thu Nov 4 11:19:29 CST 2004 |
From: Ken W. <kwi...@us...> - 2004-11-13 15:07:19
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18613/t Modified Files: Tag: release-0_26_branch basic.t Added Files: Tag: release-0_26_branch ext.t Log Message: Move shell-split tests to t/ext.t Index: basic.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/basic.t,v retrieving revision 1.27.2.2 retrieving revision 1.27.2.3 diff -C2 -d -r1.27.2.2 -r1.27.2.3 *** basic.t 13 Oct 2004 18:56:45 -0000 1.27.2.2 --- basic.t 13 Nov 2004 15:07:10 -0000 1.27.2.3 *************** *** 3,7 **** use strict; use Test; ! BEGIN { plan tests => 49 } use Module::Build; ok(1); --- 3,7 ---- use strict; use Test; ! BEGIN { plan tests => 37 } use Module::Build; ok(1); *************** *** 156,182 **** } - # Test shell emulation stuff - { - my @words = Module::Build->split_like_shell(q{one t'wo th'ree f"o\"ur " "five" }); - ok @words, 4; - ok $words[0], 'one'; - ok $words[1], 'two three'; - ok $words[2], 'fo"ur '; - ok $words[3], 'five'; - - # Test whitespace handling - @words = Module::Build->split_like_shell(q{ foo bar }); - ok @words, 2; - ok $words[0], 'foo'; - ok $words[1], 'bar'; - - # Test some Win32-specific stuff - my $win = 'Module::Build::Platform::Windows'; - eval "use $win; 1" or die $@; - - @words = $win->split_like_shell(q{foo "\bar\baz" "b\"nai"}); - ok @words, 3; - ok $words[0], 'foo'; - ok $words[1], '\bar\baz'; - ok $words[2], 'b"nai'; - } --- 156,157 ---- --- NEW FILE: ext.t --- use strict; use Test; my @unix_splits = ( { q{one t'wo th'ree f"o\"ur " "five" } => [ 'one', 'two three', 'fo"ur ', 'five' ] }, { q{ foo bar } => [ 'foo', 'bar' ] }, ); my @win_splits = ( { 'a" "b\\c" "d' => [ 'a b\c d' ] }, { '"a b\\c d"' => [ 'a b\c d' ] }, { '"a b"\\"c d"' => [ 'a b"c', 'd' ] }, { '"a b"\\\\"c d"' => [ 'a b\c d' ] }, { '"a"\\"b" "a\\"b"' => [ 'a"b a"b' ] }, { '"a"\\\\"b" "a\\\\"b"' => [ 'a\b', 'a\b' ] }, { '"a"\\"b a\\"b"' => [ 'a"b', 'a"b' ] }, { 'a"\\"b" "a\\"b' => [ 'a"b', 'a"b' ] }, { 'a"\\"b" "a\\"b' => [ 'a"b', 'a"b' ] }, { 'a b' => [ 'a', 'b' ] }, { 'a"\\"b a\\"b' => [ 'a"b a"b' ] }, { '"a""b" "a"b"' => [ 'a"b ab' ] }, { '\\"a\\"' => [ '"a"' ] }, { '"a"" "b"' => [ 'a"', 'b' ] }, { 'a"b' => [ 'ab' ] }, { 'a""b' => [ 'ab' ] }, { 'a"""b' => [ 'a"b' ] }, { 'a""""b' => [ 'a"b' ] }, { 'a"""""b' => [ 'a"b' ] }, { 'a""""""b' => [ 'a""b' ] }, { '"a"b"' => [ 'ab' ] }, { '"a""b"' => [ 'a"b' ] }, { '"a"""b"' => [ 'a"b' ] }, { '"a""""b"' => [ 'a"b' ] }, { '"a"""""b"' => [ 'a""b' ] }, { '"a""""""b"' => [ 'a""b' ] }, { '' => [ ] }, { ' ' => [ ] }, { '""' => [ '' ] }, { '" "' => [ ' ' ] }, { '""a' => [ 'a' ] }, { '""a b' => [ 'a', 'b' ] }, { 'a""' => [ 'a' ] }, { 'a"" b' => [ 'a', 'b' ] }, { '"" a' => [ '', 'a' ] }, { 'a ""' => [ 'a', '' ] }, { 'a "" b' => [ 'a', '', 'b' ] }, { 'a " " b' => [ 'a', ' ', 'b' ] }, { 'a " b " c' => [ 'a', ' b ', 'c' ] }, ); plan tests => 1 + 2*@unix_splits + 2*@win_splits; use Module::Build; ok(1); use Module::Build::Platform::Unix; foreach my $test (@unix_splits) { do_split_tests('Module::Build::Platform::Unix', $test); } use Module::Build::Platform::Windows; foreach my $test (@win_splits) { do_split_tests('Module::Build::Platform::Windows', $test); } sub do_split_tests { my ($package, $test) = @_; my ($string, $expected) = %$test; my @result = $package->split_like_shell($string); ok( grep( {!defined()} @result ), # all defined 0, "'$string' result all defined" ); ok( join(' ', map "{$_}", @result), join(' ', map "{$_}", @$expected), join(' ', map "{$_}", @$expected) ); } |
From: Ken W. <kwi...@us...> - 2004-11-13 15:06:30
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build/Platform In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18453/lib/Module/Build/Platform Modified Files: Tag: release-0_26_branch Windows.pm Log Message: Reimplement the 'special' brand of shell-splitting for windows Index: Windows.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Platform/Windows.pm,v retrieving revision 1.13.2.3 retrieving revision 1.13.2.4 diff -C2 -d -r1.13.2.3 -r1.13.2.4 *** Windows.pm 4 Nov 2004 17:17:25 -0000 1.13.2.3 --- Windows.pm 13 Nov 2004 15:06:21 -0000 1.13.2.4 *************** *** 256,271 **** sub split_like_shell { ! # In Win32 command shells, the backslashes in the string "\bar\baz" ! # should be preserved, because they often show up as parts of ! # pathnames. We double-up all these backslashes so shellwords() can ! # still be used (making sure to avoid backslash-quote pairs, which ! # should work the same as on Unix) ! (my $self, local $_) = @_; ! if (defined() && length() && !ref()) { ! s/\\(?!")/\\\\/g; } ! ! return $self->SUPER::split_like_shell($_); } --- 256,312 ---- sub split_like_shell { ! # As it turns out, Windows command-parsing is very different from ! # Unix command-parsing. Double-quotes mean different things, ! # backslashes don't necessarily mean escapes, and so on. So we ! # can't use Text::ParseWords::shellwords() to break a command string ! # into words. The algorithm below was bashed out by Randy and Ken ! # (mostly Randy), and there are a lot of regression tests, so we ! # should feel free to adjust if desired. ! (my $self, local $_) = @_; ! ! my @argv; ! return @argv unless defined() && length(); ! ! my $arg = ''; ! my( $i, $quote_mode ) = ( 0, 0 ); ! ! while ( $i < length() ) { ! ! my $ch = substr( $_, $i , 1 ); ! my $next_ch = substr( $_, $i+1, 1 ); ! ! if ( $ch eq '\\' && $next_ch eq '"' ) { ! $arg .= '"'; ! $i++; ! } elsif ( $ch eq '\\' && $next_ch eq '\\' ) { ! $arg .= '\\'; ! $i++; ! } elsif ( $ch eq '"' && $next_ch eq '"' && $quote_mode ) { ! $quote_mode = !$quote_mode; ! $arg .= '"'; ! $i++; ! } elsif ( $ch eq '"' && $next_ch eq '"' && !$quote_mode && ! ( $i + 2 == length() || ! substr( $_, $i + 2, 1 ) eq ' ' ) ! ) { # for cases like: a"" => [ 'a' ] ! push( @argv, $arg ); ! $arg = ''; ! $i += 2; ! } elsif ( $ch eq '"' ) { ! $quote_mode = !$quote_mode; ! } elsif ( $ch eq ' ' && !$quote_mode ) { ! push( @argv, $arg ) if $arg; ! $arg = ''; ! ++$i while substr( $_, $i + 1, 1 ) eq ' '; ! } else { ! $arg .= $ch; ! } ! ! $i++; } ! ! push( @argv, $arg ) if defined( $arg ) && length( $arg ); ! return @argv; } |
From: Randy W. S. <si...@us...> - 2004-11-13 09:30:57
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build/Platform In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20706/lib/Module/Build/Platform Modified Files: Windows.pm Log Message: Updated split_like_shell() on Win32 platform to behave more like the native shells (command.com and cmd.exe) with regards to quoting and escape characters. Index: Windows.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Platform/Windows.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Windows.pm 5 Nov 2004 01:51:55 -0000 1.17 --- Windows.pm 13 Nov 2004 09:30:47 -0000 1.18 *************** *** 69,84 **** sub split_like_shell { ! # In Win32 command shells, the backslashes in the string "\bar\baz" ! # should be preserved, because they often show up as parts of ! # pathnames. We double-up all these backslashes so shellwords() can ! # still be used (making sure to avoid backslash-quote pairs, which ! # should work the same as on Unix) ! (my $self, local $_) = @_; ! if (defined() && length() && !ref()) { ! s/\\(?!")/\\\\/g; } ! return $self->SUPER::split_like_shell($_); } --- 69,105 ---- sub split_like_shell { ! my $self = shift; ! local $_ = shift; ! my @argv; ! return @argv unless defined; ! return @$_ if UNIVERSAL::isa($_, 'ARRAY'); ! s/^\s+|\s+$//g; ! return @argv unless length; ! ! push @argv, ''; ! my $quote_mode = 0; ! ! while (length()) { ! if ( s/^\\(\"|\\)// ) { ! $argv[-1] .= $1; ! ! } elsif ( $quote_mode && s/^""// ) { ! $quote_mode = 0; ! $argv[-1] .= '"'; ! ! } elsif ( s/^\"// ) { ! $quote_mode = !$quote_mode; ! ! } elsif ( !$quote_mode && s/^\s+// ) { ! push @argv, ''; ! ! } else { ! s/^(.)//; ! $argv[-1] .= $1; ! } } ! return @argv; } |
From: Randy W. S. <si...@us...> - 2004-11-13 09:30:57
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20706/t Modified Files: basic.t common.pl Log Message: Updated split_like_shell() on Win32 platform to behave more like the native shells (command.com and cmd.exe) with regards to quoting and escape characters. Index: common.pl =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/common.pl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** common.pl 5 Sep 2004 19:50:15 -0000 1.9 --- common.pl 13 Nov 2004 09:30:48 -0000 1.10 *************** *** 64,66 **** --- 64,77 ---- } + sub array_eq { # like Test::More::eq_array + my( $a1, $a2 ) = @_; + return 0 unless @$a1 == @$a2; + + for my $i ( 0..$#{$a1} ) { + return 0 unless $a1->[$i] eq $a2->[$i]; + } + + return 1; + } + 1; Index: basic.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/basic.t,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** basic.t 14 Oct 2004 03:38:12 -0000 1.29 --- basic.t 13 Nov 2004 09:30:48 -0000 1.30 *************** *** 3,7 **** use strict; use Test; ! BEGIN { plan tests => 49 } use Module::Build; ok(1); --- 3,7 ---- use strict; use Test; ! BEGIN { plan tests => 85 } use Module::Build; ok(1); *************** *** 158,162 **** # Test shell emulation stuff { ! my @words = Module::Build->split_like_shell(q{one t'wo th'ree f"o\"ur " "five" }); ok @words, 4; ok $words[0], 'one'; --- 158,162 ---- # Test shell emulation stuff { ! my @words = Module::Build::Base->split_like_shell(q{one t'wo th'ree f"o\"ur " "five" }); ok @words, 4; ok $words[0], 'one'; *************** *** 174,182 **** my $win = 'Module::Build::Platform::Windows'; eval "use $win; 1" or die $@; ! ! @words = $win->split_like_shell(q{foo "\bar\baz" "b\"nai"}); ! ok @words, 3; ! ok $words[0], 'foo'; ! ok $words[1], '\bar\baz'; ! ok $words[2], 'b"nai'; } --- 174,226 ---- my $win = 'Module::Build::Platform::Windows'; eval "use $win; 1" or die $@; ! ! my @tests = ( ! { 'a" "b\\c" "d' => [ 'a b\c d' ] }, ! { '"a b\\c d"' => [ 'a b\c d' ] }, ! { '"a b"\\"c d"' => [ 'a b"c', 'd' ] }, ! { '"a b"\\\\"c d"' => [ 'a b\c d' ] }, ! { '"a"\\"b" "a\\"b"' => [ 'a"b a"b' ] }, ! { '"a"\\\\"b" "a\\\\"b"' => [ 'a\b', 'a\b' ] }, ! { '"a"\\"b a\\"b"' => [ 'a"b', 'a"b' ] }, ! { 'a"\\"b" "a\\"b' => [ 'a"b', 'a"b' ] }, ! { 'a"\\"b" "a\\"b' => [ 'a"b', 'a"b' ] }, ! { 'a b' => [ 'a', 'b' ] }, ! { 'a"\\"b a\\"b' => [ 'a"b a"b' ] }, ! { '"a""b" "a"b"' => [ 'a"b ab' ] }, ! { '\\"a\\"' => [ '"a"' ] }, ! { '"a"" "b"' => [ 'a"', 'b' ] }, ! { 'a"b' => [ 'ab' ] }, ! { 'a""b' => [ 'ab' ] }, ! { 'a"""b' => [ 'a"b' ] }, ! { 'a""""b' => [ 'a"b' ] }, ! { 'a"""""b' => [ 'a"b' ] }, ! { 'a""""""b' => [ 'a""b' ] }, ! { '"a"b"' => [ 'ab' ] }, ! { '"a""b"' => [ 'a"b' ] }, ! { '"a"""b"' => [ 'a"b' ] }, ! { '"a""""b"' => [ 'a"b' ] }, ! { '"a"""""b"' => [ 'a""b' ] }, ! { '"a""""""b"' => [ 'a""b' ] }, ! { '' => [ ] }, ! { ' ' => [ ] }, ! { '""' => [ '' ] }, ! { '" "' => [ ' ' ] }, ! { '""a' => [ 'a' ] }, ! { '""a b' => [ 'a', 'b' ] }, ! { 'a""' => [ 'a' ] }, ! { 'a"" b' => [ 'a', 'b' ] }, ! { '"" a' => [ '', 'a' ] }, ! { 'a ""' => [ 'a', '' ] }, ! { 'a "" b' => [ 'a', '', 'b' ] }, ! { 'a " " b' => [ 'a', ' ', 'b' ] }, ! { 'a " b " c' => [ 'a', ' b ', 'c' ] }, ! { 'a "\\b\\c" "d\\"e"' => [ 'a', '\b\c', 'd"e' ] }, ! ); ! ! local $" = ', '; ! foreach my $test ( @tests ) { ! my( $string, $expected ) = %$test; ! my @result = $win->split_like_shell( $string ); ! ok array_eq( \@result, $expected ); ! } } |
From: Ken W. <kwi...@us...> - 2004-11-12 02:34:39
|
Update of /cvsroot/module-build/Module-Build/lib/Module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27208/lib/Module Modified Files: Build.pm Log Message: Integrate from bugfix branch Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build.pm,v retrieving revision 1.167 retrieving revision 1.168 diff -C2 -d -r1.167 -r1.168 *** Build.pm 9 Nov 2004 23:47:06 -0000 1.167 --- Build.pm 12 Nov 2004 02:34:31 -0000 1.168 *************** *** 768,771 **** --- 768,782 ---- code that creates them. + =item new_from_context(%args) + + When called from a directory containing a F<Build.PL> script and a + F<META.yml> file (in other words, the base directory of a + distribution), this method will run the F<Build.PL> and return the + resulting C<Module::Build> object to the caller. Any key-value + arguments given to C<new_from_context()> are essentially like + command-line arguments given to the F<Build.PL> script, so for example + you could pass C<< verbose => 1 >> to this method to turn on + verbosity. + =item resume() |
From: Ken W. <kwi...@us...> - 2004-11-12 02:28:16
|
Update of /cvsroot/module-build/Module-Build/lib/Module In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26079/lib/Module Modified Files: Tag: release-0_26_branch Build.pm Log Message: Document the new_from_context() method Index: Build.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build.pm,v retrieving revision 1.164.2.2 retrieving revision 1.164.2.3 diff -C2 -d -r1.164.2.2 -r1.164.2.3 *** Build.pm 4 Nov 2004 17:20:31 -0000 1.164.2.2 --- Build.pm 12 Nov 2004 02:28:07 -0000 1.164.2.3 *************** *** 768,771 **** --- 768,782 ---- code that creates them. + =item new_from_context(%args) + + When called from a directory containing a F<Build.PL> script and a + F<META.yml> file (in other words, the base directory of a + distribution), this method will run the F<Build.PL> and return the + resulting C<Module::Build> object to the caller. Any key-value + arguments given to C<new_from_context()> are essentially like + command-line arguments given to the F<Build.PL> script, so for example + you could pass C<< verbose => 1 >> to this method to turn on + verbosity. + =item resume() |