Thread: [Module-build-general] squeaking wheel
Status: Beta
Brought to you by:
kwilliams
|
From: Richard C. <ric...@un...> - 2003-04-04 12:36:22
|
I know I'm being a bit impatient, but I submitted a patch to fix a bug with scripts support a few days ago, and it's not yet gone in. http://rt.cpan.org/NoAuth/Bug.html?id=2321 To add to my rudeness, I'm going to suggest that once that patch, or an equivalent, is in 0.18 should be released, since it's a showstopper for my application. And in summary. ME! ME! ME! NOW! NOW NOW! -- Richard Clamp <ric...@un...> |
|
From: Ken W. <ke...@ma...> - 2003-04-04 15:10:03
|
On Friday, April 4, 2003, at 06:34 AM, Richard Clamp wrote: > I know I'm being a bit impatient, but I submitted a patch to fix a bug > with scripts support a few days ago, and it's not yet gone in. > > http://rt.cpan.org/NoAuth/Bug.html?id=2321 Yes - I'll be happy to apply it, but what I'd *really* love is a test that exercises it too. At minimum it could be something in the t/Sample/ test module, just checking to make sure a script gets created in t/Sample/blib/script/ . What would be great would be to also make sure the installation happens correctly, and the 'destdir' parameter could help test that locally. Sorry to seem inattentive, I started a new job this week. That's why I got to spend so much time on this last week. =) In any case, I'll apply your patchlet now. > To add to my rudeness, I'm going to suggest that once that patch, or > an equivalent, is in 0.18 should be released, since it's a showstopper > for my application. Yeah - and it also adds support for VMS, which some insane people will likely appreciate. -Ken |
|
From: Richard C. <ric...@un...> - 2003-04-04 15:51:40
Attachments:
scripts.test
script
|
On Fri, Apr 04, 2003 at 09:09:55AM -0600, Ken Williams wrote: > Yes - I'll be happy to apply it, but what I'd *really* love is a test > that exercises it too. At minimum it could be something in the > t/Sample/ test module, just checking to make sure a script gets created > in t/Sample/blib/script/ . Attached (the script file needs to live in t/Sample). I also added a test to check that the shebang line was getting munged from "#!perl -w\n" into something else since I requested that change a while back. > What would be great would be to also make > sure the installation happens correctly, and the 'destdir' parameter > could help test that locally. I'll code that up separately, since I don't really understand that bit just now. > >To add to my rudeness, I'm going to suggest that once that patch, or > >an equivalent, is in 0.18 should be released, since it's a showstopper > >for my application. > > Yeah - and it also adds support for VMS, which some insane people will > likely appreciate. Thanks, and I hope your transition into the new job goes smoothly. -- Richard Clamp <ric...@un...> |
|
From: Ken W. <ke...@ma...> - 2003-04-04 16:29:31
|
On Friday, April 4, 2003, at 09:50 AM, Richard Clamp wrote: > On Fri, Apr 04, 2003 at 09:09:55AM -0600, Ken Williams wrote: >> Yes - I'll be happy to apply it, but what I'd *really* love is a test >> that exercises it too. At minimum it could be something in the >> t/Sample/ test module, just checking to make sure a script gets >> created >> in t/Sample/blib/script/ . > > Attached (the script file needs to live in t/Sample). I also added a > test to check that the shebang line was getting munged from "#!perl > -w\n" into something else since I requested that change a while back. Applied! -Ken |
|
From: Ken W. <ke...@ma...> - 2003-04-04 15:39:14
|
On Friday, April 4, 2003, at 06:34 AM, Richard Clamp wrote: > I know I'm being a bit impatient, but I submitted a patch to fix a bug > with scripts support a few days ago, and it's not yet gone in. > > http://rt.cpan.org/NoAuth/Bug.html?id=2321 Okay, this turned from a 1-line patch into the following. I did it this way because I think it's very important to keep consistency with the 'PL_files', 'pm_files', 'xs_files', and so on, so it has to be 'script_files' and not 'scripts'. Likewise, the scripts() method has to change to script_files(). Backward compatibility with 'scripts' and scripts() will be maintained for several versions. -Ken Index: lib/Module/Build.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build.pm,v retrieving revision 1.57 diff -u -r1.57 Build.pm --- lib/Module/Build.pm 29 Mar 2003 21:56:37 -0000 1.57 +++ lib/Module/Build.pm 4 Apr 2003 15:36:04 -0000 @@ -392,11 +392,15 @@ directory will be added to the search path during the compilation and linking phases of any C or XS files. -=item scripts +=item script_files An array reference containing a list of files that should be installed as perl scripts when the module is installed. +For backward compatibility, you may use the parameter C<scripts> +instead of C<script_files>. Please consider this usage deprecated, +though it will continue to exists for several version releases. + =item autosplit An optional C<autosplit> argument specifies a file which should be run @@ -608,12 +612,17 @@ about this for a while and this seemed like the most useful way to do it. -=item scripts() +=item script_files() Returns an array reference specifying the perl script files to be -installed. This corresponds to the C<scripts> parameter to the +installed. This corresponds to the C<script_files> parameter to the C<new()> method. With an optional argument, this parameter may be set dynamically. + +For backward compatibility, the C<scripts()> method does exactly the +same thing as C<script_files()>. C<scripts()> is deprecated, but it +will stay around for several versions to give people time to +transition. =item base_dir() Index: lib/Module/Build/Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.84 diff -u -r1.84 Base.pm --- lib/Module/Build/Base.pm 3 Apr 2003 02:54:45 -0000 1.84 +++ lib/Module/Build/Base.pm 4 Apr 2003 15:36:06 -0000 @@ -64,7 +64,7 @@ recommends => {}, build_requires => {}, conflicts => {}, - scripts => [], + script_files => [], perl => $perl, %input, %$cmd_properties, @@ -74,6 +74,7 @@ # Synonyms $p->{requires} = delete $p->{prereq} if exists $p->{prereq}; + $p->{script_files} = delete $p->{scripts} if exists $p->{scripts}; # Shortcuts if (exists $p->{module_name}) { @@ -186,7 +187,7 @@ requires recommends PL_files - scripts + script_files perl config_dir build_script @@ -994,13 +995,14 @@ return "$self->{properties}{dist_name}-$self->{properties}{dist_version}"; } -sub scripts { +sub script_files { my $self = shift; if (@_) { - $self->{properties}{scripts} = ref($_[0]) ? $_[0] : [@_]; + $self->{properties}{script_files} = ref($_[0]) ? $_[0] : [@_]; } - return $self->{properties}{scripts}; + return $self->{properties}{script_files}; } +*scripts = \&script_files; sub valid_licenses { return { map {$_, 1} qw(perl gpl artistic lgpl bsd open_source unrestricted restrictive unknown) }; @@ -1096,7 +1098,7 @@ $arch => $self->{config}{sitearch}); $map{$script} = $self->{config}{installscript} - if @{$self->{properties}{scripts}}; + if @{$self->{properties}{script_files}}; if (length(my $destdir = $self->{properties}{destdir} || '')) { $_ = File::Spec->catdir($destdir, $_) foreach values %map; |