Skip Menu |
 

This queue is for tickets about the Module-Install CPAN distribution.

Report information
The Basics
Id: 27242
Status: resolved
Priority: 0/
Queue: Module-Install

People
Owner: Nobody in particular
Requestors: shay [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.66_02
Fixed in: (no value)



Subject: Bug(s) in license_from()
Download (untitled) / with headers
text/plain 3.1k
(I'm actually using 0.67, but it isn't listed in the "Broken in" list.) The license_from() function contains the following code: ----- if ( $self->_slurp($file) =~ m/ ( =head \d \s+ (?:licen[cs]e|licensing|copyright|legal)\b .*? ) (=head\\d.*|=cut.*|) \z /ixms ) { my $license_text = $1; ----- Surely that "(=head\\d.*|=cut.*|)" is a typo? As it stands, it clearly doesn't spot the end of the POD section that it has picked up, and the whole of the rest of the file ends up in $license_text! Presumably it was meant to say "(=head \d.*|=cut.*|)" instead? But then I find that things don't work correctly in my modules (which I'm currently trying to upgrade the Module-Install components of). Consider Win32-UTCFileTime. The POD currently contains the following near the end of the file: ----- =head1 COPYRIGHT Copyright (C) 2003-2007 Steve Hay. All rights reserved. Portions Copyright (C) 2001 Jonathan M Gilligan. Used with permission. Portions Copyright (C) 2001 Tony M Hoyle. Used with permission. =head1 LICENCE This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself, i.e. under the terms of either the GNU General Public License or the Artistic License, as specified in the F<LICENCE> file. ----- If I run M-I 0.67 as it stands then everything from "=head1 COPYRIGHT" to the end of the file is picked up and I get the warning about "All rights reserved" having been seen. If I fix "(=head\\d.*|=cut.*|)" to "(=head \d.*|=cut.*|)" in the code above and try again then now it only picks up the COPYRIGHT section, not the LICENCE section that follows it, and complains that it "Cannot determine license info" (and doesn't print the warning about "All rights reserved" either, despite that being in the COPYRIGHT section that it found!) If I also swap around the order of my COPYRIGHT and LICENCE sections then M-I is now happy when it shouldn't be: This time it only picks up the LICENCE section, so it finds license info, but doesn't see the "All rights reserved" in the COPYRIGHT section! I guess license_from() wasn't expecting to find separate COPYRIGHT and LICENCE sections. Can this be sorted out (as well as the "head\\d" bug above)? Btw, I also notice that many of the .pm files in Module-Install itself say "All rights reserved", despite its claim to be under the same terms as perl itself: C:\Temp\Module-Install-0.67>\cygwin\bin\grep -lr "All rights reserved" * Changes README inc/Module/Install/Metadata.pm lib/Module/Install/Can.pm lib/Module/Install/Deprecated.pm lib/Module/Install/External.pm lib/Module/Install/Metadata.pm lib/Module/Install/PAR.pm lib/Module/Install/Philosophy.pod lib/Module/Install/Share.pm Actually, loads of files in the perl distribution itself say "All rights reserved" anyway. Where did you get your information that this phrase causes problems? I had a quick look around on www.opensource.org for help but couldn't see anything in particular. I did, however, notice that various OSI approved licences contain the "All rights reserved" phrase anyway, include the widely used BSD-style licence: http://www.opensource.org/licenses/bsd-license.php
Download (untitled) / with headers
text/plain 3.5k
Hi. Split _extract_license() in the trunk into two to give "LICENSE" (or -CE or -CING) higher priority; will be fixed in the next release. Thanks. On 2007-5-22 Tue 08:45:17, SHAY wrote: Show quoted text
> (I'm actually using 0.67, but it isn't listed in the "Broken in"
list.) Show quoted text
> > The license_from() function contains the following code: > > ----- > if ( > $self->_slurp($file) =~ m/ > ( > =head \d \s+ > (?:licen[cs]e|licensing|copyright|legal)\b > .*? > ) > (=head\\d.*|=cut.*|) > \z > /ixms > ) > { > my $license_text = $1; > ----- > > Surely that "(=head\\d.*|=cut.*|)" is a typo? As it stands, it clearly > doesn't spot the end of the POD section that it has picked up, and the > whole of the rest of the file ends up in $license_text! > > Presumably it was meant to say "(=head \d.*|=cut.*|)" instead? > > But then I find that things don't work correctly in my modules (which > I'm currently trying to upgrade the Module-Install components of). > > Consider Win32-UTCFileTime. The POD currently contains the following > near the end of the file: > > ----- > =head1 COPYRIGHT > > Copyright (C) 2003-2007 Steve Hay. All rights reserved. > > Portions Copyright (C) 2001 Jonathan M Gilligan. Used with
permission. Show quoted text
> > Portions Copyright (C) 2001 Tony M Hoyle. Used with permission. > > =head1 LICENCE > > This module is free software; you can redistribute it and/or modify it > under the > same terms as Perl itself, i.e. under the terms of either the GNU > General Public > License or the Artistic License, as specified in the F<LICENCE> file. > ----- > > If I run M-I 0.67 as it stands then everything from "=head1 COPYRIGHT" > to the end of the file is picked up and I get the warning about "All > rights reserved" having been seen. > > If I fix "(=head\\d.*|=cut.*|)" to "(=head \d.*|=cut.*|)" in the code > above and try again then now it only picks up the COPYRIGHT section,
not Show quoted text
> the LICENCE section that follows it, and complains that it "Cannot > determine license info" (and doesn't print the warning about "All
rights Show quoted text
> reserved" either, despite that being in the COPYRIGHT section that it > found!) > > If I also swap around the order of my COPYRIGHT and LICENCE sections > then M-I is now happy when it shouldn't be: This time it only picks up > the LICENCE section, so it finds license info, but doesn't see the
"All Show quoted text
> rights reserved" in the COPYRIGHT section! > > I guess license_from() wasn't expecting to find separate COPYRIGHT and > LICENCE sections. Can this be sorted out (as well as the "head\\d" bug > above)? > > Btw, I also notice that many of the .pm files in Module-Install itself > say "All rights reserved", despite its claim to be under the same
terms Show quoted text
> as perl itself: > > C:\Temp\Module-Install-0.67>\cygwin\bin\grep -lr "All rights
reserved" * Show quoted text
> Changes > README > inc/Module/Install/Metadata.pm > lib/Module/Install/Can.pm > lib/Module/Install/Deprecated.pm > lib/Module/Install/External.pm > lib/Module/Install/Metadata.pm > lib/Module/Install/PAR.pm > lib/Module/Install/Philosophy.pod > lib/Module/Install/Share.pm > > Actually, loads of files in the perl distribution itself say "All
rights Show quoted text
> reserved" anyway. Where did you get your information that this phrase > causes problems? > > I had a quick look around on www.opensource.org for help but couldn't > see anything in particular. I did, however, notice that various OSI > approved licences contain the "All rights reserved" phrase anyway, > include the widely used BSD-style licence: > > http://www.opensource.org/licenses/bsd-license.php
Hi. 0.95 is out. If you still have the problem, reopen this. Thanks.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.