module-build-general Mailing List for Module::Build (Page 158)
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...> - 2003-09-04 20:36:11
|
On Thursday, September 4, 2003, at 02:40 PM, gwhite wrote:
>
>
>> -----Original Message-----
>> From: Ken Williams [mailto:ke...@ma...]
>> Sent: Thursday, September 04, 2003 2:11 PM
>>
>> I think it's correct as written - it accepts either a 'to' parameter
>> indicating a file, or a 'to_dir' parameter indicating a directory.
>> This is analogous to the shell command 'cp':
>>
>> cp file.txt foo/file.txt # explicit filename given
>> cp file.txt foo/ # same thing with implicit filename
>>
>>
>
> I don't believe so, the arguments receive by the routine are:
> my %args = @_ > 3 ? @_ : ( from => shift, to_dir => shift, flatten =>
> shift ); but my Perl is not quite good enough to grok the "@_ > 3 ? @_"
> part
That means it can either be called with positional parameters:
$b->copy_if_modified($from, $to_dir, $flatten)
or with named parameters:
$b->copy_if_modified(from => $from,
to_dir => $to_dir)
$b->copy_if_modified(from => $from,
to => $to_file)
But really, you should only trust the documentation, which says it
accepts named parameters. The positional parameters are just for
backward compatibility and will go away sometime fairly soon.
>>
>> $to_path is a file name, not a directory name.
>
> Not according to the POD. And under Win32 if I put /my/foo/bar/ in the
> $to_path, only /my/foo gets created.
What POD? The POD in Module/Build.pm says:
Takes the file in the C<from> parameter and copies it to the file in
the C<to> parameter, or the directory in the C<to_dir> parameter ...
Also, I hope you're not putting *anything* directly in $to_path - you
should provide a 'to' or 'to_dir' parameter.
>
> When I try and add to the install_types it just ignores me....
> $build->install_types( [ "cgi", "config" ] ); what should I change?
The install_types() method is [currently] read-only, but you can pass a
parameter to new() as follows:
install_types => [qw( lib arch script bindoc libdoc cgi config )],
or you could omit any of the ones you don't need. They're defined in
the Module::Build documentation under "How Installation Paths are
Determined".
-Ken
|
|
From: gwhite <gw...@he...> - 2003-09-04 19:38:49
|
> -----Original Message-----
> From: Ken Williams [mailto:ke...@ma...]
> Sent: Thursday, September 04, 2003 2:11 PM
>
>
> On Thursday, September 4, 2003, at 01:34 PM, gwhite wrote:
>
> > Line 1925-27 in base.pm is:
> > my $to_path = $args{to} || File::Spec->catfile( $args{to_dir},
> > $args{flatten}
> > ?
> > File::Basename::basename($file)
> > : $file );
> > Should be:
> > my $to_path = $args{to_dir} || File::Spec->catfile(
> $args{to_dir},
> > $args{flatten}
> > ?
> > File::Basename::basename($file)
> > : $file );
> >
> > the missing _dir appears to be a typo.
>
> I think it's correct as written - it accepts either a 'to' parameter
> indicating a file, or a 'to_dir' parameter indicating a directory.
> This is analogous to the shell command 'cp':
>
> cp file.txt foo/file.txt # explicit filename given
> cp file.txt foo/ # same thing with implicit filename
>
>
I don't believe so, the arguments receive by the routine are:
my %args = @_ > 3 ? @_ : ( from => shift, to_dir => shift, flatten =>
shift ); but my Perl is not quite good enough to grok the "@_ > 3 ? @_"
part
> >
> > And since to_dir is supposed to be a directory 1930-31 should change
> > from:
> > # Create parent directories
> > File::Path::mkpath(File::Basename::dirname($to_path), 0, 0777);
> >
> > To:
> >
> > # Create parent directories
> > File::Path::mkpath($to_path, 0, 0777);
>
> $to_path is a file name, not a directory name.
Not according to the POD. And under Win32 if I put /my/foo/bar/ in the
$to_path, only /my/foo gets created.
>
>
> > I am using the module to install a complete perl only application on
> > web servers (cross platform), the feature I would like to see is the
> > ability
> > to have other subdirectories (off of basedir) copied where
> I need them
> > on the web server (html, config files, templates, fonts for
> PDF). It
> > seems that if I could add my own install types, then set the install
> > path that would do it, but maybe I am missing something.
>
> Yeah, that should do it.
When I try and add to the install_types it just ignores me....
$build->install_types( [ "cgi", "config" ] ); what should I change?
Greg
|
|
From: Ken W. <ke...@ma...> - 2003-09-04 19:10:57
|
On Thursday, September 4, 2003, at 01:34 PM, gwhite wrote:
> Line 1925-27 in base.pm is:
> my $to_path = $args{to} || File::Spec->catfile( $args{to_dir},
> $args{flatten}
> ?
> File::Basename::basename($file)
> : $file );
> Should be:
> my $to_path = $args{to_dir} || File::Spec->catfile( $args{to_dir},
> $args{flatten}
> ?
> File::Basename::basename($file)
> : $file );
>
> the missing _dir appears to be a typo.
I think it's correct as written - it accepts either a 'to' parameter
indicating a file, or a 'to_dir' parameter indicating a directory.
This is analogous to the shell command 'cp':
cp file.txt foo/file.txt # explicit filename given
cp file.txt foo/ # same thing with implicit filename
>
> And since to_dir is supposed to be a directory 1930-31 should change
> from:
> # Create parent directories
> File::Path::mkpath(File::Basename::dirname($to_path), 0, 0777);
>
> To:
>
> # Create parent directories
> File::Path::mkpath($to_path, 0, 0777);
$to_path is a file name, not a directory name.
> I am using the module to install a complete perl only application on
> web
> servers (cross platform), the feature I would like to see is the
> ability
> to have other subdirectories (off of basedir) copied where I need them
> on the web server (html, config files, templates, fonts for PDF). It
> seems that if I could add my own install types, then set the install
> path that would do it, but maybe I am missing something.
Yeah, that should do it.
-Ken
|
|
From: gwhite <gw...@he...> - 2003-09-04 18:58:07
|
I am doing some work with it and I don't think
copy_if_modified(%parameters) works the way it was intended. These
comments are based on the .20 version on CPAN
Line 1925-27 in base.pm is:
my $to_path = $args{to} || File::Spec->catfile( $args{to_dir},
$args{flatten}
?
File::Basename::basename($file)
: $file );
Should be:
my $to_path = $args{to_dir} || File::Spec->catfile( $args{to_dir},
$args{flatten}
?
File::Basename::basename($file)
: $file );
the missing _dir appears to be a typo.
And since to_dir is supposed to be a directory 1930-31 should change
from:
# Create parent directories
File::Path::mkpath(File::Basename::dirname($to_path), 0, 0777);
To:
# Create parent directories
File::Path::mkpath($to_path, 0, 0777);
otherwise the last portion of the directory is getting chopped off
(/my/foo/bar is shortened to /my/foo)
Every step of the process the prompts come up, is that how it is
supposed to work? How do I get them to only come up once (preferrably
at Build.PL)??
All this was observed on a Win32 system, I will be testing FreeBSD next
week.
I am using the module to install a complete perl only application on web
servers (cross platform), the feature I would like to see is the ability
to have other subdirectories (off of basedir) copied where I need them
on the web server (html, config files, templates, fonts for PDF). It
seems that if I could add my own install types, then set the install
path that would do it, but maybe I am missing something.
I am self taught Perl coder, so I may be off track and I don't quite get
some of the terminology (this statement "This method may be called as a
class or object method." and the subclassing stuff for example). Let me
know if I need to clarify anything.
Greg White
HealthStatus.com, Inc.
317.823.2687
fax 317.823.2697
Greg White
HealthStatus.com, Inc.
317.823.2687
fax 317.823.2697
|
|
From: Ken W. <ke...@ma...> - 2003-09-02 16:20:31
|
On Tuesday, September 2, 2003, at 10:11 AM, Dave Rolsky wrote: > On Tue, 2 Sep 2003, Ken Williams wrote: > >> It has come to my attention that M::B's signatures don't play nice >> with >> the MANIFEST file. The signing process will proceed fine if SIGNATURE >> isn't in the MANIFEST, but then the signature isn't valid >> (Module::Signature complains about the missing entry). If you add >> SIGNATURE to the MANIFEST and don't create the SIGNATURE file first, >> then 'Build dist' won't work because the file is missing. If you do >> create the SIGNATURE file (using 'touch SIGNATURE' or the like) then >> Module::Signature seems unable to overwrite the file. >> >> Needs to be fixed, of course. > > I think this is why I added a "sign" property. If this exists the > distdir > action will call _sign_dir(). I think with this property set, things > should work fine as long as SIGNATURE is in the MANIFEST. Nope, still doesn't work - try doing this and then verify the signature using 'cpansign -v'. It will complain because the SIGNATURE file is out of date (it was necessarily created before distdir & signing, because it was in the MANIFEST). Autrijus says the solution may be to add "overwrite => 1" to Module::Signature::sign(). Then at least it works if you do "touch SIGNATURE; Build dist". -Ken |
|
From: Dave R. <au...@ur...> - 2003-09-02 15:11:38
|
On Tue, 2 Sep 2003, Ken Williams wrote: > It has come to my attention that M::B's signatures don't play nice with > the MANIFEST file. The signing process will proceed fine if SIGNATURE > isn't in the MANIFEST, but then the signature isn't valid > (Module::Signature complains about the missing entry). If you add > SIGNATURE to the MANIFEST and don't create the SIGNATURE file first, > then 'Build dist' won't work because the file is missing. If you do > create the SIGNATURE file (using 'touch SIGNATURE' or the like) then > Module::Signature seems unable to overwrite the file. > > Needs to be fixed, of course. I think this is why I added a "sign" property. If this exists the distdir action will call _sign_dir(). I think with this property set, things should work fine as long as SIGNATURE is in the MANIFEST. Maybe we should just remove the "distsign" action entirely, and tell people to set this property in their Build.PL if they want signed distros. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/ |
|
From: Ken W. <ke...@ma...> - 2003-09-02 14:37:21
|
Hi, It has come to my attention that M::B's signatures don't play nice with the MANIFEST file. The signing process will proceed fine if SIGNATURE isn't in the MANIFEST, but then the signature isn't valid (Module::Signature complains about the missing entry). If you add SIGNATURE to the MANIFEST and don't create the SIGNATURE file first, then 'Build dist' won't work because the file is missing. If you do create the SIGNATURE file (using 'touch SIGNATURE' or the like) then Module::Signature seems unable to overwrite the file. Needs to be fixed, of course. -Ken |
|
From: Ken W. <ke...@ma...> - 2003-09-02 00:45:04
|
On Monday, September 1, 2003, at 12:07 PM, <da...@gi...> wrote: > t/xs............ok 6/11Can't exec "gcc'": No such file or directory at > /root/.cpan/build/Module-Build-0.20/blib/lib/Module/Build/Base.pm line > 1917, > <File0000> line 14. Lemme guess - Red Hat 9? Have a look at https://rt.cpan.org/Ticket/Display.html?id=3687 where a similar-looking issue was reported. -Ken |
|
From: <da...@gi...> - 2003-09-01 17:07:41
|
I tried to compile Module::Buid by hand also with the same error. Should I
just force the install?
cpan -i Module::Build
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Mon, 01 Sep 2003 11:45:29 GMT
Running install for module Module::Build
Running make for K/KW/KWILLIAMS/Module-Build-0.20.tar.gz
CPAN: Digest::MD5 loaded ok
CPAN: Compress::Zlib loaded ok
Checksum for
/root/.cpan/sources/authors/id/K/KW/KWILLIAMS/Module-Build-0.20.tar.gz ok
Scanning cache /root/.cpan/build for sizes
Module-Build-0.20/
Module-Build-0.20/Build.PL
Module-Build-0.20/Changes
Module-Build-0.20/INSTALL.txt
Module-Build-0.20/lib/
Module-Build-0.20/lib/Module/
Module-Build-0.20/lib/Module/Build/
Module-Build-0.20/lib/Module/Build/Base.pm
Module-Build-0.20/lib/Module/Build/Compat.pm
Module-Build-0.20/lib/Module/Build/Cookbook.pm
Module-Build-0.20/lib/Module/Build/Platform/
Module-Build-0.20/lib/Module/Build/Platform/Amiga.pm
Module-Build-0.20/lib/Module/Build/Platform/darwin.pm
Module-Build-0.20/lib/Module/Build/Platform/Default.pm
Module-Build-0.20/lib/Module/Build/Platform/EBCDIC.pm
Module-Build-0.20/lib/Module/Build/Platform/MacOS.pm
Module-Build-0.20/lib/Module/Build/Platform/MPEiX.pm
Module-Build-0.20/lib/Module/Build/Platform/RiscOS.pm
Module-Build-0.20/lib/Module/Build/Platform/Unix.pm
Module-Build-0.20/lib/Module/Build/Platform/VMS.pm
Module-Build-0.20/lib/Module/Build/Platform/VOS.pm
Module-Build-0.20/lib/Module/Build/Platform/Windows.pm
Module-Build-0.20/lib/Module/Build/PPMMaker.pm
Module-Build-0.20/lib/Module/Build.pm
Module-Build-0.20/Makefile.PL
Module-Build-0.20/MANIFEST
Module-Build-0.20/META.yml
Module-Build-0.20/README
Module-Build-0.20/t/
Module-Build-0.20/t/basic.t
Module-Build-0.20/t/common.pl
Module-Build-0.20/t/compat.t
Module-Build-0.20/t/extend.t
Module-Build-0.20/t/install.t
Module-Build-0.20/t/lib/
Module-Build-0.20/t/lib/ModuleBuildOne.pm
Module-Build-0.20/t/MANIFEST
Module-Build-0.20/t/manifypods.t
Module-Build-0.20/t/notes.t
Module-Build-0.20/t/runthrough.t
Module-Build-0.20/t/Sample/
Module-Build-0.20/t/Sample/bin/
Module-Build-0.20/t/Sample/bin/sample.pl
Module-Build-0.20/t/Sample/Build.PL
Module-Build-0.20/t/Sample/lib/
Module-Build-0.20/t/Sample/lib/Sample/
Module-Build-0.20/t/Sample/lib/Sample/Docs.pod
Module-Build-0.20/t/Sample/lib/Sample/NoPod.pm
Module-Build-0.20/t/Sample/lib/Sample.pm
Module-Build-0.20/t/Sample/MANIFEST
Module-Build-0.20/t/Sample/META.yml
Module-Build-0.20/t/Sample/script
Module-Build-0.20/t/Sample/test.pl
Module-Build-0.20/t/signature.t
Module-Build-0.20/t/versions.t
Module-Build-0.20/t/xs.t
Module-Build-0.20/t/XSTest/
Module-Build-0.20/t/XSTest/Build.PL
Module-Build-0.20/t/XSTest/Changes
Module-Build-0.20/t/XSTest/lib/
Module-Build-0.20/t/XSTest/lib/XSTest.pm
Module-Build-0.20/t/XSTest/lib/XSTest.xs
Module-Build-0.20/t/XSTest/MANIFEST
Module-Build-0.20/t/XSTest/test.pl
Removing previously used /root/.cpan/build/Module-Build-0.20
CPAN.pm: Going to build K/KW/KWILLIAMS/Module-Build-0.20.tar.gz
/usr/bin/perl Build.PL
Checking whether your kit is complete...
Looks good
Creating new 'Build' script for 'Module-Build' version '0.20'
/usr/bin/perl Build
lib/Module/Build/Platform/darwin.pm ->
blib/lib/Module/Build/Platform/darwin.pm
lib/Module/Build/Platform/MacOS.pm ->
blib/lib/Module/Build/Platform/MacOS.pm
lib/Module/Build/Compat.pm -> blib/lib/Module/Build/Compat.pm
lib/Module/Build/Platform/RiscOS.pm ->
blib/lib/Module/Build/Platform/RiscOS.pm
lib/Module/Build/Platform/VOS.pm -> blib/lib/Module/Build/Platform/VOS.pm
lib/Module/Build/Platform/Windows.pm ->
blib/lib/Module/Build/Platform/Windows.pm
lib/Module/Build/Platform/Unix.pm -> blib/lib/Module/Build/Platform/Unix.pm
lib/Module/Build/Platform/Amiga.pm ->
blib/lib/Module/Build/Platform/Amiga.pm
lib/Module/Build/Base.pm -> blib/lib/Module/Build/Base.pm
lib/Module/Build/Platform/EBCDIC.pm ->
blib/lib/Module/Build/Platform/EBCDIC.pm
lib/Module/Build/Platform/MPEiX.pm ->
blib/lib/Module/Build/Platform/MPEiX.pm
lib/Module/Build/Platform/VMS.pm -> blib/lib/Module/Build/Platform/VMS.pm
lib/Module/Build.pm -> blib/lib/Module/Build.pm
lib/Module/Build/PPMMaker.pm -> blib/lib/Module/Build/PPMMaker.pm
lib/Module/Build/Cookbook.pm -> blib/lib/Module/Build/Cookbook.pm
lib/Module/Build/Platform/Default.pm ->
blib/lib/Module/Build/Platform/Default.pm
Manifying blib/lib/Module/Build/Platform/Unix.pm ->
blib/libdoc/Module::Build::Platform::Unix.3pm
Manifying blib/lib/Module/Build/Platform/EBCDIC.pm ->
blib/libdoc/Module::Build::Platform::EBCDIC.3pm
Manifying blib/lib/Module/Build/Platform/MPEiX.pm ->
blib/libdoc/Module::Build::Platform::MPEiX.3pm
Manifying blib/lib/Module/Build/Platform/Windows.pm ->
blib/libdoc/Module::Build::Platform::Windows.3pm
Manifying blib/lib/Module/Build/Platform/MacOS.pm ->
blib/libdoc/Module::Build::Platform::MacOS.3pm
Manifying blib/lib/Module/Build/PPMMaker.pm ->
blib/libdoc/Module::Build::PPMMaker.3pm
Manifying blib/lib/Module/Build/Platform/VOS.pm ->
blib/libdoc/Module::Build::Platform::VOS.3pm
Manifying blib/lib/Module/Build.pm -> blib/libdoc/Module::Build.3pm
Manifying blib/lib/Module/Build/Platform/Default.pm ->
blib/libdoc/Module::Build::Platform::Default.3pm
Manifying blib/lib/Module/Build/Platform/RiscOS.pm ->
blib/libdoc/Module::Build::Platform::RiscOS.3pm
Manifying blib/lib/Module/Build/Cookbook.pm ->
blib/libdoc/Module::Build::Cookbook.3pm
Manifying blib/lib/Module/Build/Platform/Amiga.pm ->
blib/libdoc/Module::Build::Platform::Amiga.3pm
Manifying blib/lib/Module/Build/Platform/darwin.pm ->
blib/libdoc/Module::Build::Platform::darwin.3pm
Manifying blib/lib/Module/Build/Platform/VMS.pm ->
blib/libdoc/Module::Build::Platform::VMS.3pm
Manifying blib/lib/Module/Build/Base.pm ->
blib/libdoc/Module::Build::Base.3pm
Manifying blib/lib/Module/Build/Compat.pm ->
blib/libdoc/Module::Build::Compat.3pm
/usr/bin/make -- OK
Running make test
/usr/bin/perl Build test
t/basic.........ok
t/compat........ok
t/extend........ok
t/install.......ok
t/manifypods....ok
t/notes.........ok
t/runthrough....ok
t/signature.....skipped
all skipped: Skipping unless $ENV{TEST_SIGNATURE} is true
t/versions......ok
t/xs............NOK 4# Test 4 got: 'error building lib/XSTest.o from
'lib/XSTest.so' at
/root/.cpan/build/Module-Build-0.20/blib/lib/Module/Build/Base.pm line 1797,
<File0000> line 14.
' (t/xs.t at line 33)
# Expected: ''
# t/xs.t line 33 is: ok $@, '';
t/xs............ok 6/11Can't exec "gcc'": No such file or directory at
/root/.cpan/build/Module-Build-0.20/blib/lib/Module/Build/Base.pm line 1917,
<File0000> line 14.
error building lib/XSTest.o from 'lib/XSTest.so' at
/root/.cpan/build/Module-Build-0.20/blib/lib/Module/Build/Base.pm line 1797,
<File0000> line 14.
t/xs............NOK 8# Test 8 got: 'error building lib/XSTest.o from
'lib/XSTest.so' at
/root/.cpan/build/Module-Build-0.20/blib/lib/Module/Build/Base.pm line 1797,
<File0000> line 14.
' (t/xs.t at line 50)
# Expected: ''
# t/xs.t line 50 is: ok $@, '';
t/xs............FAILED tests 4, 8
Failed 2/11 tests, 81.82% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
----------------------------------------------------------------------------
---
t/xs.t 11 2 18.18% 4 8
1 test skipped.
Failed 1/10 test scripts, 90.00% okay. 2/127 subtests failed, 98.43% okay.
make: *** [test] Error 29
/usr/bin/make test -- NOT OK
Running make install
make test had returned bad status, won't install without forc
Thanks,
David Gitman
David(at)gitman.net
www.gitman.net
|
|
From: <da...@gi...> - 2003-09-01 17:02:20
|
I tried to compile Module::Buid by hand also with the same error. Should I
just force the install?
cpan -i Module::Build
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Mon, 01 Sep 2003 11:45:29 GMT
Running install for module Module::Build
Running make for K/KW/KWILLIAMS/Module-Build-0.20.tar.gz
CPAN: Digest::MD5 loaded ok
CPAN: Compress::Zlib loaded ok
Checksum for
/root/.cpan/sources/authors/id/K/KW/KWILLIAMS/Module-Build-0.20.tar.gz ok
Scanning cache /root/.cpan/build for sizes
Module-Build-0.20/
Module-Build-0.20/Build.PL
Module-Build-0.20/Changes
Module-Build-0.20/INSTALL.txt
Module-Build-0.20/lib/
Module-Build-0.20/lib/Module/
Module-Build-0.20/lib/Module/Build/
Module-Build-0.20/lib/Module/Build/Base.pm
Module-Build-0.20/lib/Module/Build/Compat.pm
Module-Build-0.20/lib/Module/Build/Cookbook.pm
Module-Build-0.20/lib/Module/Build/Platform/
Module-Build-0.20/lib/Module/Build/Platform/Amiga.pm
Module-Build-0.20/lib/Module/Build/Platform/darwin.pm
Module-Build-0.20/lib/Module/Build/Platform/Default.pm
Module-Build-0.20/lib/Module/Build/Platform/EBCDIC.pm
Module-Build-0.20/lib/Module/Build/Platform/MacOS.pm
Module-Build-0.20/lib/Module/Build/Platform/MPEiX.pm
Module-Build-0.20/lib/Module/Build/Platform/RiscOS.pm
Module-Build-0.20/lib/Module/Build/Platform/Unix.pm
Module-Build-0.20/lib/Module/Build/Platform/VMS.pm
Module-Build-0.20/lib/Module/Build/Platform/VOS.pm
Module-Build-0.20/lib/Module/Build/Platform/Windows.pm
Module-Build-0.20/lib/Module/Build/PPMMaker.pm
Module-Build-0.20/lib/Module/Build.pm
Module-Build-0.20/Makefile.PL
Module-Build-0.20/MANIFEST
Module-Build-0.20/META.yml
Module-Build-0.20/README
Module-Build-0.20/t/
Module-Build-0.20/t/basic.t
Module-Build-0.20/t/common.pl
Module-Build-0.20/t/compat.t
Module-Build-0.20/t/extend.t
Module-Build-0.20/t/install.t
Module-Build-0.20/t/lib/
Module-Build-0.20/t/lib/ModuleBuildOne.pm
Module-Build-0.20/t/MANIFEST
Module-Build-0.20/t/manifypods.t
Module-Build-0.20/t/notes.t
Module-Build-0.20/t/runthrough.t
Module-Build-0.20/t/Sample/
Module-Build-0.20/t/Sample/bin/
Module-Build-0.20/t/Sample/bin/sample.pl
Module-Build-0.20/t/Sample/Build.PL
Module-Build-0.20/t/Sample/lib/
Module-Build-0.20/t/Sample/lib/Sample/
Module-Build-0.20/t/Sample/lib/Sample/Docs.pod
Module-Build-0.20/t/Sample/lib/Sample/NoPod.pm
Module-Build-0.20/t/Sample/lib/Sample.pm
Module-Build-0.20/t/Sample/MANIFEST
Module-Build-0.20/t/Sample/META.yml
Module-Build-0.20/t/Sample/script
Module-Build-0.20/t/Sample/test.pl
Module-Build-0.20/t/signature.t
Module-Build-0.20/t/versions.t
Module-Build-0.20/t/xs.t
Module-Build-0.20/t/XSTest/
Module-Build-0.20/t/XSTest/Build.PL
Module-Build-0.20/t/XSTest/Changes
Module-Build-0.20/t/XSTest/lib/
Module-Build-0.20/t/XSTest/lib/XSTest.pm
Module-Build-0.20/t/XSTest/lib/XSTest.xs
Module-Build-0.20/t/XSTest/MANIFEST
Module-Build-0.20/t/XSTest/test.pl
Removing previously used /root/.cpan/build/Module-Build-0.20
CPAN.pm: Going to build K/KW/KWILLIAMS/Module-Build-0.20.tar.gz
/usr/bin/perl Build.PL
Checking whether your kit is complete...
Looks good
Creating new 'Build' script for 'Module-Build' version '0.20'
/usr/bin/perl Build
lib/Module/Build/Platform/darwin.pm ->
blib/lib/Module/Build/Platform/darwin.pm
lib/Module/Build/Platform/MacOS.pm ->
blib/lib/Module/Build/Platform/MacOS.pm
lib/Module/Build/Compat.pm -> blib/lib/Module/Build/Compat.pm
lib/Module/Build/Platform/RiscOS.pm ->
blib/lib/Module/Build/Platform/RiscOS.pm
lib/Module/Build/Platform/VOS.pm -> blib/lib/Module/Build/Platform/VOS.pm
lib/Module/Build/Platform/Windows.pm ->
blib/lib/Module/Build/Platform/Windows.pm
lib/Module/Build/Platform/Unix.pm -> blib/lib/Module/Build/Platform/Unix.pm
lib/Module/Build/Platform/Amiga.pm ->
blib/lib/Module/Build/Platform/Amiga.pm
lib/Module/Build/Base.pm -> blib/lib/Module/Build/Base.pm
lib/Module/Build/Platform/EBCDIC.pm ->
blib/lib/Module/Build/Platform/EBCDIC.pm
lib/Module/Build/Platform/MPEiX.pm ->
blib/lib/Module/Build/Platform/MPEiX.pm
lib/Module/Build/Platform/VMS.pm -> blib/lib/Module/Build/Platform/VMS.pm
lib/Module/Build.pm -> blib/lib/Module/Build.pm
lib/Module/Build/PPMMaker.pm -> blib/lib/Module/Build/PPMMaker.pm
lib/Module/Build/Cookbook.pm -> blib/lib/Module/Build/Cookbook.pm
lib/Module/Build/Platform/Default.pm ->
blib/lib/Module/Build/Platform/Default.pm
Manifying blib/lib/Module/Build/Platform/Unix.pm ->
blib/libdoc/Module::Build::Platform::Unix.3pm
Manifying blib/lib/Module/Build/Platform/EBCDIC.pm ->
blib/libdoc/Module::Build::Platform::EBCDIC.3pm
Manifying blib/lib/Module/Build/Platform/MPEiX.pm ->
blib/libdoc/Module::Build::Platform::MPEiX.3pm
Manifying blib/lib/Module/Build/Platform/Windows.pm ->
blib/libdoc/Module::Build::Platform::Windows.3pm
Manifying blib/lib/Module/Build/Platform/MacOS.pm ->
blib/libdoc/Module::Build::Platform::MacOS.3pm
Manifying blib/lib/Module/Build/PPMMaker.pm ->
blib/libdoc/Module::Build::PPMMaker.3pm
Manifying blib/lib/Module/Build/Platform/VOS.pm ->
blib/libdoc/Module::Build::Platform::VOS.3pm
Manifying blib/lib/Module/Build.pm -> blib/libdoc/Module::Build.3pm
Manifying blib/lib/Module/Build/Platform/Default.pm ->
blib/libdoc/Module::Build::Platform::Default.3pm
Manifying blib/lib/Module/Build/Platform/RiscOS.pm ->
blib/libdoc/Module::Build::Platform::RiscOS.3pm
Manifying blib/lib/Module/Build/Cookbook.pm ->
blib/libdoc/Module::Build::Cookbook.3pm
Manifying blib/lib/Module/Build/Platform/Amiga.pm ->
blib/libdoc/Module::Build::Platform::Amiga.3pm
Manifying blib/lib/Module/Build/Platform/darwin.pm ->
blib/libdoc/Module::Build::Platform::darwin.3pm
Manifying blib/lib/Module/Build/Platform/VMS.pm ->
blib/libdoc/Module::Build::Platform::VMS.3pm
Manifying blib/lib/Module/Build/Base.pm ->
blib/libdoc/Module::Build::Base.3pm
Manifying blib/lib/Module/Build/Compat.pm ->
blib/libdoc/Module::Build::Compat.3pm
/usr/bin/make -- OK
Running make test
/usr/bin/perl Build test
t/basic.........ok
t/compat........ok
t/extend........ok
t/install.......ok
t/manifypods....ok
t/notes.........ok
t/runthrough....ok
t/signature.....skipped
all skipped: Skipping unless $ENV{TEST_SIGNATURE} is true
t/versions......ok
t/xs............NOK 4# Test 4 got: 'error building lib/XSTest.o from
'lib/XSTest.so' at
/root/.cpan/build/Module-Build-0.20/blib/lib/Module/Build/Base.pm line 1797,
<File0000> line 14.
' (t/xs.t at line 33)
# Expected: ''
# t/xs.t line 33 is: ok $@, '';
t/xs............ok 6/11Can't exec "gcc'": No such file or directory at
/root/.cpan/build/Module-Build-0.20/blib/lib/Module/Build/Base.pm line 1917,
<File0000> line 14.
error building lib/XSTest.o from 'lib/XSTest.so' at
/root/.cpan/build/Module-Build-0.20/blib/lib/Module/Build/Base.pm line 1797,
<File0000> line 14.
t/xs............NOK 8# Test 8 got: 'error building lib/XSTest.o from
'lib/XSTest.so' at
/root/.cpan/build/Module-Build-0.20/blib/lib/Module/Build/Base.pm line 1797,
<File0000> line 14.
' (t/xs.t at line 50)
# Expected: ''
# t/xs.t line 50 is: ok $@, '';
t/xs............FAILED tests 4, 8
Failed 2/11 tests, 81.82% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
----------------------------------------------------------------------------
---
t/xs.t 11 2 18.18% 4 8
1 test skipped.
Failed 1/10 test scripts, 90.00% okay. 2/127 subtests failed, 98.43% okay.
make: *** [test] Error 29
/usr/bin/make test -- NOT OK
Running make install
make test had returned bad status, won't install without forc
Thanks,
David Gitman
David(at)gitman.net
www.gitman.net
|
|
From: Ken W. <ke...@ma...> - 2003-09-01 15:53:40
|
On Saturday, August 30, 2003, at 05:17 PM, Uri Guttman wrote: > > a good patch (so far :) > > you still are doing the slower print vs syswrite and also the read > slurping can be factored out. if you want to do that before i can, be > my > guest. :) I'm happy to factor out the slurping, but I don't care too much about print vs. syswrite. I'd probably rather use print, just because it's more standard and easier to fiddle with. > > i just don't like using IO::File for simple I/O stuff. it gains nothing > and it slows stuff down. Speed isn't really a major consideration here, maintainability is a lot more important. I do find the IO::File interface a bit more pleasant than using globs or the Symbol module (which is really just globs too). -Ken |
|
From: <iv...@ab...> - 2003-09-01 09:30:02
|
It is my first time to work with installation procedures on perl, so I am alittle confused about 2 thinks which i hope are clear to whom is expert in perl. In which variable is described the structure and the files that should be copied? Where to tell that I have 20files and 20dirs and I want 10of them to go $userinput/blabla 10of them to $userinput2/blabla ..and so on. Now I am doing: script_files => [ 'nt.cgi', 'skel', # dir 'skel/button.html.skel', # file in this dir? ], is this ok? |
|
From: Uri G. <ur...@st...> - 2003-08-30 22:17:53
|
>>>>> "KW" =3D=3D Ken Williams <ke...@ma...> writes: KW> On Saturday, August 30, 2003, at 02:03 AM, Uri Guttman wrote: >>=20 >> i have been looking at Base.pm and how it does various file things. i >> see use of IO::File and also of open. and much code could be factored >> out into subs that write hashes with data::dumper and load them back >> in. i will do a pass over those subs and send in a patch. not sure when >> i will get it done but maybe next week. KW> Lemme apply patch this pre=EBmptively. a good patch (so far :) you still are doing the slower print vs syswrite and also the read slurping can be factored out. if you want to do that before i can, be my guest. :) i just don't like using IO::File for simple I/O stuff. it gains nothing and it slows stuff down. i am working on my new slurp module which will be much faster than print (which uses stdio, buffering and does lots of stuff inside). i will let you know when you can get the code and paste it in. thanx, uri --=20 Uri Guttman ------ ur...@st... -------- http://www.stemsystems.c= om --Perl Consulting, Stem Development, Systems Architecture, Design and Codin= g- Search or Offer Perl Jobs ---------------------------- http://jobs.perl.o= rg Damian Conway Class in Boston - Sept 2003 -- http://www.stemsystems.com/cla= ss |
|
From: Ken W. <ke...@ma...> - 2003-08-30 20:45:59
|
On Saturday, August 30, 2003, at 02:03 AM, Uri Guttman wrote:
>
> i have been looking at Base.pm and how it does various file things. i
> see use of IO::File and also of open. and much code could be factored
> out into subs that write hashes with data::dumper and load them back
> in. i will do a pass over those subs and send in a patch. not sure =
when
> i will get it done but maybe next week.
Lemme apply patch this pre=EBmptively.
-Ken
Index: lib/Module/Build/Base.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
RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v
retrieving revision 1.180
diff -u -r1.180 Base.pm
--- lib/Module/Build/Base.pm 26 Aug 2003 18:33:29 -0000 1.180
+++ lib/Module/Build/Base.pm 30 Aug 2003 20:44:35 -0000
@@ -440,11 +440,8 @@
if (my $file =3D $self->config_file($name)) {
return if -e $file and !keys %{ $ph->{new} }; # Nothing to do
- local $Data::Dumper::Terse =3D 1;
- my $fh =3D IO::File->new("> $file") or die "Can't write to $file:=20=
$!";
@{$ph->{disk}}{ keys %{$ph->{new}} } =3D values %{$ph->{new}}; #=20=
Merge
- print $fh Data::Dumper::Dumper($ph->{disk});
- close $fh;
+ $self->_write_dumper($name, $ph->{disk});
$ph->{new} =3D {};
}
@@ -515,24 +512,24 @@
}
}
+sub _write_dumper {
+ my ($self, $filename, $data) =3D @_;
+
+ my $file =3D $self->config_file($filename);
+ my $fh =3D IO::File->new("> $file") or die "Can't create '$file': =
$!";
+ local $Data::Dumper::Terse =3D 1;
+ print $fh Data::Dumper::Dumper($data);
+}
+
sub write_config {
my ($self) =3D @_;
File::Path::mkpath($self->{properties}{config_dir});
-d $self->{properties}{config_dir} or die "Can't mkdir=20
$self->{properties}{config_dir}: $!";
- local $Data::Dumper::Terse =3D 1;
-
- my $file =3D $self->config_file('build_params');
- my $fh =3D IO::File->new("> $file") or die "Can't create '$file': =
$!";
- print $fh Data::Dumper::Dumper([$self->{args}, $self->{config},=20
$self->{properties}]);
- close $fh;
-
- $file =3D $self->config_file('prereqs');
- open $fh, "> $file" or die "Can't create '$file': $!";
my @items =3D qw(requires build_requires conflicts recommends);
- print $fh Data::Dumper::Dumper( { map { $_, $self->$_() } @items } );
- close $fh;
+ $self->_write_dumper('prereqs', { map { $_, $self->$_() } @items });
+ $self->_write_dumper('build_params', [$self->{args},=20
$self->{config}, $self->{properties}]);
$self->_persistent_hash_write('cleanup');
}
|
|
From: Uri G. <ur...@st...> - 2003-08-30 07:04:18
|
i have been looking at Base.pm and how it does various file things. i see use of IO::File and also of open. and much code could be factored out into subs that write hashes with data::dumper and load them back in. i will do a pass over those subs and send in a patch. not sure when i will get it done but maybe next week. uri -- Uri Guttman ------ ur...@st... -------- http://www.stemsystems.com --Perl Consulting, Stem Development, Systems Architecture, Design and Coding- Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org Damian Conway Class in Boston - Sept 2003 -- http://www.stemsystems.com/class |
|
From: Uri G. <ur...@st...> - 2003-08-30 06:53:47
|
in playing with build i seemed to have corrupted the _build/cleanup
file. i don't know how it happened but i was installing various versions
of module::build to see why recursive test finding stopped working. .19
did it and .20 didn't by default. this was posted here by schwern just
before.
the problem with the corruption of the cleanup file was finding which
file was broken.
i was getting this lovely output:
Build
Bareword found where operator expected at (eval 9) line 4, near "}
blib"
(Missing operator before blib?)
syntax error at (eval 9) line 6, near "}
blib
running under -d helped me to locate it.
Bareword found where operator expected at (eval 11)[/usr/local/lib/perl5/site_perl/5.6.1/Module/Build/Base.pm:480] line 4, near "}
blib"
this is the fun code:
sub _persistent_hash_restore {
my ($self, $name) = @_;
my $ph = $self->{phash}{$name} ||= {disk => {}, new => {}};
my $file = $self->config_file($name) or die "No config file '$name'";
my $fh = IO::File->new("< $file") or die "Can't read $file: $!";
$ph->{disk} = eval do {local $/; <$fh>};
die $@ if $@;
}
if the eval fails it should print $@ and also name the corrupted file.
also i notice the slurp idiom there. if you care about speed (and build
seems slow enough at it is), then use a faster slurp technique. in fact
i am writing an article for perl.com on slurping and i will be posting
to cpan a module for this. but you can just use this and it will be much
faster:
sub read_file {
my( $file_name ) = shift ;
local( *FH ) ;
open( FH, $file_name ) || die "can't open $file_name $!" ;
return <FH> if wantarray ;
my $buf ;
sysread( FH, $buf, -s FH ) ;
return $buf ;
}
and replace the last three lines with:
$ph->{disk} = eval read_file( $file );
die "$@\ncorrupted file: $file\n" if $@;
in finding this bug, i see plenty of other ways to speed up the code and
clean it up some. maybe i will do some code review and patches. :)
having fun with build finally,
uri
--
Uri Guttman ------ ur...@st... -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
Damian Conway Class in Boston - Sept 2003 -- http://www.stemsystems.com/class
|
|
From: Michael G S. <sc...@po...> - 2003-08-30 06:27:21
|
It appears that 0.20 turned off searching for test files recursively by default. This wasn't mentioned in the change log. Its now necessary to set the undocumented recursive_test_files property for the old recursive behavior to happen. In the interest of backwards compatibility and DWIMness, I think it should be recursive by default. The problems I talked about earlier with recusive .t search are fairly special cases and can be avoided by turning it off. I'd recommend that a new version which makes recursive test search default again be release posthaste to restore the old behavior before it effects too many people. I'd supply a patch, but I'm not sure where/how property defaults are set. -- Michael G Schwern sc...@po... http://www.pobox.com/~schwern/ Its not stupid, its advanced. |
|
From: Randy W. S. <Ra...@Th...> - 2003-08-29 06:33:58
|
Uri Guttman wrote: > hi guys, > > how well does build work on winblows? i don't have direct access to > winblows to play with it. does module::build install well there too? is > there an activestate whatever of it? and is it recent? M::B works fine on windoze, and it is available via ActiveState's package manager <http://ppm.activestate.com> > also someone is working on improving how stem works with module::build > so i hope i have interesting news soonish. i have some neat little ideas > that you may want to integrate back in. we will subclass for now. > > inquiring minds want to know! > > uri > > |
|
From: Dave R. <au...@ur...> - 2003-08-29 05:53:18
|
On Fri, 29 Aug 2003, Uri Guttman wrote: > how well does build work on winblows? i don't have direct access to > winblows to play with it. does module::build install well there too? is > there an activestate whatever of it? and is it recent? Since it's all pure Perl and uses only core Perl modules (for most core functionality), it should "just work" on Win32, and any platform where core Perl passes all its tests. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/ |
|
From: Uri G. <ur...@st...> - 2003-08-29 05:41:24
|
hi guys, how well does build work on winblows? i don't have direct access to winblows to play with it. does module::build install well there too? is there an activestate whatever of it? and is it recent? also someone is working on improving how stem works with module::build so i hope i have interesting news soonish. i have some neat little ideas that you may want to integrate back in. we will subclass for now. inquiring minds want to know! uri -- Uri Guttman ------ ur...@st... -------- http://www.stemsystems.com --Perl Consulting, Stem Development, Systems Architecture, Design and Coding- Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org Damian Conway Class in Boston - Sept 2003 -- http://www.stemsystems.com/class |
|
From: Soren A <per...@wo...> - 2003-08-28 20:46:48
|
On Thu, Aug 28, 2003 at 09:03:54AM -0500, Dave Rolsky wrote: > On Thu, 28 Aug 2003, Ken Williams wrote: >=20 > > Actually, any distribution that includes a "passthrough" or "small" > > Makefile.PL (as described in Module::Build::Compat) will also be built > > by CPAN using Module::Build. However, there aren't many of those at > > the moment on CPAN as far as I know. =20 > I have a bunch that do that, including DateTime::TimeZone, > DateTime::Locale, DateTime::Format::MySQL, DateTime::Format::ICal, > Log::Dispatch, Alzabo, and Thesaurus. The last one may have been the > first module to ever use the passthrough Makefile.PL stuff. Ah, see now that makes sense. I installed a bunch of the modules that comprise Bundle::DateTime last week, and it was some of those, including I am sure, DateTime::Locale, that were breaking when using CPAN, for me. So I wasn't hallucinating all this. Soren |
|
From: Michael G S. <sc...@po...> - 2003-08-28 20:45:31
|
On Thu, Aug 28, 2003 at 09:01:53AM -0500, Dave Rolsky wrote: > > AFAIK nobody's seriously tried patching CPAN.pm for Module::Build. I doubt > > it would be easy. > > ACtually, I sent a patch for this to Andreas quite some time ago. I could > send it again. Yeah, give him a kick. -- Michael G Schwern sc...@po... http://www.pobox.com/~schwern/ Operation Bitter Jungle Cat |
|
From: Soren A <per...@wo...> - 2003-08-28 20:30:39
|
On Thu, Aug 28, 2003 at 08:51:20AM -0500, Ken Williams wrote:
> Subject: Re: [PATCH] Re: [Module-build-general] Breaking CPAN installs..
[Sorry to go messing w/ the subject: line, just trimmed it a bit for
esthetics...]
> On Thursday, August 28, 2003, at 03:43 AM, Soren A wrote:
>=20
> >When I wrote previously that "I tried Michael's patch with the first
> >CPAN module that uses Module::Build that I could lay hands on, M::B
> >it's self", that didn't make a lot od sense, did it? Actually, is it
> >true as I now realize that *using good 'ol CPAN.pm*, the *only*
> >package out there that's going to use Module::Build to build itself
> >is Module::Build, itself ("Who's on First" -- whaa? that's what I'm
> >asking, you dope, who's on first?")? because calling `make' is so
> >hardwired in to CPAN.pm? It's always going to try to build modules
> >the same way.
> Actually, any distribution that includes a "passthrough" or "small"=20
> Makefile.PL (as described in Module::Build::Compat) will also be built=20
> by CPAN using Module::Build. However, there aren't many of those at=20
> the moment on CPAN as far as I know.
And I ASSumed that one of your newer modules, like Path::Class, would be
one. My mistake, Ken, sorry for the confusion.
> >I used CPAN to fetch-prepare-install Ken's Path::Class a minute ago and
> >the discomforting realization of my ignorance hit me. So are we just
> >waiting for the world to shift to CPANPLUS? Hmmm, now I have to (after
> >some sleep) hit the Fine Documentation.
=20
> What happened with Path::Class? It's got a normal Makefile.PL that=20
> uses MakeMaker, so it should have worked fine with the 'verbose' flag=20
> even before Schwern's patch.
Nothing bad happened (now you understand, it was my expectations that
were in error). Is there anywhere being kept a list, of what CPAN
modules are using Module::Build and might have such a "pass-through"
Makefile.PL? Is there any way to query for this?
Anyway, Class::Path just built the way any old CPAN module would. What I
wanted was to see the passthrough Makefile.PL in action (and now that
I've had some sleep I am understanding about the "passthrough"
Makefile.PL being an optional technique to be found in some, but by no
means all, modules that are released with Build.PL's).
Thanks for the clarifications.
Soren
|
|
From: Michael G S. <sc...@po...> - 2003-08-28 20:19:48
|
On Thu, Aug 28, 2003 at 09:05:11AM -0500, Ken Williams wrote:
> Here's how I'll apply - actually, I've got two variants, which one
> should I use? I.e., how unique is 'verbose'?
Both your patches won't don't translate "perl Makefile.PL verbose verbose"
to verbose=2 which is how it should work. Though at this time it doesn't
look like you have verbosity levels in Module::Build.
Looking at the MM argument parsing code, I think the only other special
argument is 'help'. However...
$ perl Makefile.PL help
Undefined subroutine &ExtUtils::MakeMaker::help called at lib/ExtUtils/MakeMaker.pm line 664.
So I wouldn't worry about that. :)
> Index: lib/Module/Build/Compat.pm
> ===================================================================
> RCS file:
> /cvsroot/module-build/Module-Build/lib/Module/Build/Compat.pm,v
> retrieving revision 1.29
> diff -u -r1.29 Compat.pm
> --- lib/Module/Build/Compat.pm 13 Aug 2003 15:27:27 -0000 1.29
> +++ lib/Module/Build/Compat.pm 28 Aug 2003 14:01:46 -0000
> @@ -96,7 +96,9 @@
> shift;
> my @out;
> foreach my $arg (@_) {
> - my ($key, $val) = $arg =~ /^(\w+)=(.+)/ or die "Malformed argument
> '$arg'";
> + my ($key, $val) = ($arg =~ /^(\w+)=(.+)/ ? ($1, $2) :
> + $arg =~ /^(\w+)$/ ? ($1, 1) :
> + die "Malformed argument '$arg'");
> if (exists $Config{lc($key)}) {
> push @out, 'config=' . lc($key) . "=$val";
> } elsif (exists $makefile_to_build{$key}) {
>
>
> Index: lib/Module/Build/Compat.pm
> ===================================================================
> RCS file:
> /cvsroot/module-build/Module-Build/lib/Module/Build/Compat.pm,v
> retrieving revision 1.29
> diff -u -r1.29 Compat.pm
> --- lib/Module/Build/Compat.pm 13 Aug 2003 15:27:27 -0000 1.29
> +++ lib/Module/Build/Compat.pm 28 Aug 2003 14:02:13 -0000
> @@ -96,7 +96,9 @@
> shift;
> my @out;
> foreach my $arg (@_) {
> - my ($key, $val) = $arg =~ /^(\w+)=(.+)/ or die "Malformed argument
> '$arg'";
> + my ($key, $val) = ($arg =~ /^(\w+)=(.+)/ ? ($1, $2) :
> + $arg =~ /^(verbose)$/ ? ($1, 1) :
> + die "Malformed argument '$arg'");
> if (exists $Config{lc($key)}) {
> push @out, 'config=' . lc($key) . "=$val";
> } elsif (exists $makefile_to_build{$key}) {
>
--
Michael G Schwern sc...@po... http://www.pobox.com/~schwern/
"Let's face it," said bearded Rusty Simmons, opening a can after the
race. "This is a good excuse to drink some beer." At 10:30 in the
morning? "Well, it's past noon in Dublin," said teammate Mike
[Joseph] Schwern. "It's our duty."
-- "Sure, and It's a Great Day for Irish Runners"
Newsday, Sunday, March 20, 1988
|
|
From: Ken W. <ke...@ma...> - 2003-08-28 14:05:23
|
On Wednesday, August 27, 2003, at 10:40 PM, Michael G Schwern wrote:
>
> Module::Build should deal with the most common arguments one would put
> into something automated like the CPAN shell. verbose must have
> slipped by. Its a bit odd, it doesn't follow the convention of a lot
> of others.
>
> Here's a patch for it.
>
Here's how I'll apply - actually, I've got two variants, which one
should I use? I.e., how unique is 'verbose'?
-Ken
Index: lib/Module/Build/Compat.pm
===================================================================
RCS file:
/cvsroot/module-build/Module-Build/lib/Module/Build/Compat.pm,v
retrieving revision 1.29
diff -u -r1.29 Compat.pm
--- lib/Module/Build/Compat.pm 13 Aug 2003 15:27:27 -0000 1.29
+++ lib/Module/Build/Compat.pm 28 Aug 2003 14:01:46 -0000
@@ -96,7 +96,9 @@
shift;
my @out;
foreach my $arg (@_) {
- my ($key, $val) = $arg =~ /^(\w+)=(.+)/ or die "Malformed argument
'$arg'";
+ my ($key, $val) = ($arg =~ /^(\w+)=(.+)/ ? ($1, $2) :
+ $arg =~ /^(\w+)$/ ? ($1, 1) :
+ die "Malformed argument '$arg'");
if (exists $Config{lc($key)}) {
push @out, 'config=' . lc($key) . "=$val";
} elsif (exists $makefile_to_build{$key}) {
Index: lib/Module/Build/Compat.pm
===================================================================
RCS file:
/cvsroot/module-build/Module-Build/lib/Module/Build/Compat.pm,v
retrieving revision 1.29
diff -u -r1.29 Compat.pm
--- lib/Module/Build/Compat.pm 13 Aug 2003 15:27:27 -0000 1.29
+++ lib/Module/Build/Compat.pm 28 Aug 2003 14:02:13 -0000
@@ -96,7 +96,9 @@
shift;
my @out;
foreach my $arg (@_) {
- my ($key, $val) = $arg =~ /^(\w+)=(.+)/ or die "Malformed argument
'$arg'";
+ my ($key, $val) = ($arg =~ /^(\w+)=(.+)/ ? ($1, $2) :
+ $arg =~ /^(verbose)$/ ? ($1, 1) :
+ die "Malformed argument '$arg'");
if (exists $Config{lc($key)}) {
push @out, 'config=' . lc($key) . "=$val";
} elsif (exists $makefile_to_build{$key}) {
|