r35044 - in /trunk/libauthen-cas-client-perl: ./ debian/ inc/Module/ inc/Module/Install/ lib/Authen/CAS/ lib/Authen/CAS/Client/ t/
yvesago-guest at users.alioth.debian.org
yvesago-guest at users.alioth.debian.org
Fri May 8 15:51:38 UTC 2009
Author: yvesago-guest
Date: Fri May 8 15:51:31 2009
New Revision: 35044
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=35044
Log:
* new upstream release
* bump Standards-Version to 3.8.1, no change
* copyright, author changes to 2009
* copyright, bump to proposal format rev 196, move group copyright to
personnal copyright
Modified:
trunk/libauthen-cas-client-perl/CHANGES
trunk/libauthen-cas-client-perl/LICENSE
trunk/libauthen-cas-client-perl/MANIFEST
trunk/libauthen-cas-client-perl/META.yml
trunk/libauthen-cas-client-perl/Makefile.PL
trunk/libauthen-cas-client-perl/debian/changelog
trunk/libauthen-cas-client-perl/debian/control
trunk/libauthen-cas-client-perl/debian/copyright
trunk/libauthen-cas-client-perl/inc/Module/Install.pm
trunk/libauthen-cas-client-perl/inc/Module/Install/AutoInstall.pm
trunk/libauthen-cas-client-perl/inc/Module/Install/Base.pm
trunk/libauthen-cas-client-perl/inc/Module/Install/Can.pm
trunk/libauthen-cas-client-perl/inc/Module/Install/Fetch.pm
trunk/libauthen-cas-client-perl/inc/Module/Install/Include.pm
trunk/libauthen-cas-client-perl/inc/Module/Install/Makefile.pm
trunk/libauthen-cas-client-perl/inc/Module/Install/Metadata.pm
trunk/libauthen-cas-client-perl/inc/Module/Install/Win32.pm
trunk/libauthen-cas-client-perl/inc/Module/Install/WriteAll.pm
trunk/libauthen-cas-client-perl/lib/Authen/CAS/Client.pm
trunk/libauthen-cas-client-perl/lib/Authen/CAS/Client/Response.pm
trunk/libauthen-cas-client-perl/t/04-fatal.t
Modified: trunk/libauthen-cas-client-perl/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/CHANGES?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/CHANGES (original)
+++ trunk/libauthen-cas-client-perl/CHANGES Fri May 8 15:51:31 2009
@@ -1,3 +1,17 @@
+changes from 0.03 to 0.04
+-------------------------
+
+ * changed fatal behavior to throw strings instead of objects
+
+
+changes from 0.02 to 0.03
+-------------------------
+
+ * added more tests that were previously not included
+
+ * changed to Module::Install for dist packaging
+
+
changes from 0.01 to 0.02
-------------------------
@@ -9,12 +23,3 @@
* added tests for better code coverage
* various minor internal fixups to maintain consistency
-
-
-changes from 0.02 to 0.03
--------------------------
-
- * added more tests that were previously not included
-
- * changed to Module::Install for dist packaging
-
Modified: trunk/libauthen-cas-client-perl/LICENSE
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/LICENSE?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/LICENSE (original)
+++ trunk/libauthen-cas-client-perl/LICENSE Fri May 8 15:51:31 2009
@@ -1,4 +1,4 @@
-Copyright (c) 2007, jason hord
+Copyright (c) 2007-2009, jason hord
All rights reserved.
Modified: trunk/libauthen-cas-client-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/MANIFEST?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/MANIFEST (original)
+++ trunk/libauthen-cas-client-perl/MANIFEST Fri May 8 15:51:31 2009
@@ -14,7 +14,7 @@
lib/Authen/CAS/Client/Response.pm
LICENSE
Makefile.PL
-MANIFEST
+MANIFEST This list of files
META.yml
README
t/00-load.t
Modified: trunk/libauthen-cas-client-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/META.yml?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/META.yml (original)
+++ trunk/libauthen-cas-client-perl/META.yml Fri May 8 15:51:31 2009
@@ -6,11 +6,11 @@
Test::MockObject: 0.00
Test::More: 0.00
distribution_type: module
-generated_by: 'Module::Install version 0.75'
-license: MIT
+generated_by: 'Module::Install version 0.79'
+license: BSD
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.3.html
- version: 1.3
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
name: Authen-CAS-Client
no_index:
directory:
@@ -21,4 +21,4 @@
URI: 0.00
XML::LibXML: 0.00
perl: 5.6.1
-version: 0.03
+version: 0.04
Modified: trunk/libauthen-cas-client-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/Makefile.PL?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/Makefile.PL (original)
+++ trunk/libauthen-cas-client-perl/Makefile.PL Fri May 8 15:51:31 2009
@@ -4,8 +4,8 @@
use inc::Module::Install;
name 'Authen-CAS-Client';
-license 'MIT';
all_from 'lib/Authen/CAS/Client.pm';
+license 'BSD';
requires 'LWP' => '0.00';
requires 'URI' => '0.00';
Modified: trunk/libauthen-cas-client-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/debian/changelog?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/debian/changelog (original)
+++ trunk/libauthen-cas-client-perl/debian/changelog Fri May 8 15:51:31 2009
@@ -1,9 +1,17 @@
-libauthen-cas-client-perl (0.03-2) UNRELEASED; urgency=low
+libauthen-cas-client-perl (0.04-1) unstable; urgency=low
+ [ gregor herrmann ]
* debian/control: Changed: Switched Vcs-Browser field to ViewSVN
(source stanza).
- -- gregor herrmann <gregoa at debian.org> Sun, 16 Nov 2008 20:39:44 +0100
+ [ AGOSTINI Yves ]
+ * new upstream release
+ * bump Standards-Version to 3.8.1, no change
+ * copyright, author changes to 2009
+ * copyright, bump to proposal format rev 196, move group copyright to
+ personnal copyright
+
+ -- AGOSTINI Yves <agostini at univ-metz.fr> Fri, 08 May 2009 17:33:37 +0200
libauthen-cas-client-perl (0.03-1) unstable; urgency=low
Modified: trunk/libauthen-cas-client-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/debian/control?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/debian/control (original)
+++ trunk/libauthen-cas-client-perl/debian/control Fri May 8 15:51:31 2009
@@ -6,7 +6,7 @@
libxml-libxml-perl, libwww-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: AGOSTINI Yves <agostini at univ-metz.fr>
-Standards-Version: 3.8.0
+Standards-Version: 3.8.1
Homepage: http://search.cpan.org/dist/Authen-CAS-Client/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libauthen-cas-client-perl/
Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libauthen-cas-client-perl/
Modified: trunk/libauthen-cas-client-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/debian/copyright?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/debian/copyright (original)
+++ trunk/libauthen-cas-client-perl/debian/copyright Fri May 8 15:51:31 2009
@@ -1,11 +1,11 @@
-Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=102
-Debianized-By: AGOSTINI Yves <agostini at univ-metz.fr>
-Debianized-Date: Tue, 22 Apr 2008 23:26:12 +0200
-Original-Source-Location: http://search.cpan.org/dist/Authen-CAS-Client/
-Upstream-Author: jason hord <pravus at cpan.org>
+Format-Specification:
+ http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
+Upstream-Maintainer: jason hord <pravus at cpan.org>
+Upstream-Source: http://search.cpan.org/dist/Authen-CAS-Client/
+Upstream-Name: Authen-CAS-Client
Files: *
-Copyright: Copyright (c) 2007, 2008 jason hord
+Copyright: Copyright (c) 2007, 2009 jason hord
License: BSD-2
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -34,11 +34,19 @@
the same terms as Perl itself.
Files: debian/*
-Copyright: Copyright 2008 Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-License: BSD-2
- The Debian packaging is put under the same terms as the module itself.
+Copyright: 2009, AGOSTINI Yves <agostini at univ-metz.fr>
+License: Artistic | GPL-1+
-Perl is distributed under your choice of the GNU General Public License or
-the Artistic License. On Debian GNU/Linux systems, the complete text of the
-GNU General Public License can be found in `/usr/share/common-licenses/GPL'
-and the Artistic Licence in `/usr/share/common-licenses/Artistic'.
+License: Artistic
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Artistic License, which comes with Perl.
+ On Debian GNU/Linux systems, the complete text of the Artistic License
+ can be found in `/usr/share/common-licenses/Artistic'
+
+License: GPL-1+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+ On Debian GNU/Linux systems, the complete text of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL'
Modified: trunk/libauthen-cas-client-perl/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/inc/Module/Install.pm?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/inc/Module/Install.pm (original)
+++ trunk/libauthen-cas-client-perl/inc/Module/Install.pm Fri May 8 15:51:31 2009
@@ -30,7 +30,7 @@
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '0.75';
+ $VERSION = '0.79';
*inc::Module::Install::VERSION = *VERSION;
@inc::Module::Install::ISA = __PACKAGE__;
@@ -125,8 +125,10 @@
goto &$code unless $cwd eq $pwd;
}
$$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
- unshift @_, ( $self, $1 );
- goto &{$self->can('call')} unless uc($1) eq $1;
+ unless ( uc($1) eq $1 ) {
+ unshift @_, ( $self, $1 );
+ goto &{$self->can('call')};
+ }
};
}
@@ -248,7 +250,7 @@
sub load_extensions {
my ($self, $path, $top) = @_;
- unless ( grep { lc $_ eq lc $self->{prefix} } @INC ) {
+ unless ( grep { !ref $_ and lc $_ eq lc $self->{prefix} } @INC ) {
unshift @INC, $self->{prefix};
}
@@ -339,7 +341,10 @@
close FH or die "close($_[0]): $!";
}
-sub _version {
+# _version is for processing module versions (eg, 1.03_05) not
+# Perl versions (eg, 5.8.1).
+
+sub _version ($) {
my $s = shift || 0;
$s =~ s/^(\d+)\.?//;
my $l = $1 || 0;
@@ -348,6 +353,17 @@
return $l + 0;
}
+# Cloned from Params::Util::_CLASS
+sub _CLASS ($) {
+ (
+ defined $_[0]
+ and
+ ! ref $_[0]
+ and
+ $_[0] =~ m/^[^\W\d]\w*(?:::\w+)*$/s
+ ) ? $_[0] : undef;
+}
+
1;
-# Copyright 2008 Adam Kennedy.
+# Copyright 2008 - 2009 Adam Kennedy.
Modified: trunk/libauthen-cas-client-perl/inc/Module/Install/AutoInstall.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/inc/Module/Install/AutoInstall.pm?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/inc/Module/Install/AutoInstall.pm (original)
+++ trunk/libauthen-cas-client-perl/inc/Module/Install/AutoInstall.pm Fri May 8 15:51:31 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.75';
+ $VERSION = '0.79';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: trunk/libauthen-cas-client-perl/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/inc/Module/Install/Base.pm?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/inc/Module/Install/Base.pm (original)
+++ trunk/libauthen-cas-client-perl/inc/Module/Install/Base.pm Fri May 8 15:51:31 2009
@@ -1,7 +1,7 @@
#line 1
package Module::Install::Base;
-$VERSION = '0.75';
+$VERSION = '0.79';
# Suspend handler for "redefined" warnings
BEGIN {
@@ -45,6 +45,8 @@
$_[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new;
}
+#line 101
+
sub is_admin {
$_[0]->admin->VERSION;
}
@@ -67,4 +69,4 @@
1;
-#line 138
+#line 146
Modified: trunk/libauthen-cas-client-perl/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/inc/Module/Install/Can.pm?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/inc/Module/Install/Can.pm (original)
+++ trunk/libauthen-cas-client-perl/inc/Module/Install/Can.pm Fri May 8 15:51:31 2009
@@ -11,7 +11,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.75';
+ $VERSION = '0.79';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
@@ -39,6 +39,7 @@
return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd));
for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
+ next if $dir eq '';
my $abs = File::Spec->catfile($dir, $_[1]);
return $abs if (-x $abs or $abs = MM->maybe_command($abs));
}
@@ -79,4 +80,4 @@
__END__
-#line 157
+#line 158
Modified: trunk/libauthen-cas-client-perl/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/inc/Module/Install/Fetch.pm?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/inc/Module/Install/Fetch.pm (original)
+++ trunk/libauthen-cas-client-perl/inc/Module/Install/Fetch.pm Fri May 8 15:51:31 2009
@@ -6,20 +6,20 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.75';
+ $VERSION = '0.79';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
sub get_file {
my ($self, %args) = @_;
- my ($scheme, $host, $path, $file) =
+ my ($scheme, $host, $path, $file) =
$args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
if ( $scheme eq 'http' and ! eval { require LWP::Simple; 1 } ) {
$args{url} = $args{ftp_url}
or (warn("LWP support unavailable!\n"), return);
- ($scheme, $host, $path, $file) =
+ ($scheme, $host, $path, $file) =
$args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
}
Modified: trunk/libauthen-cas-client-perl/inc/Module/Install/Include.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/inc/Module/Install/Include.pm?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/inc/Module/Install/Include.pm (original)
+++ trunk/libauthen-cas-client-perl/inc/Module/Install/Include.pm Fri May 8 15:51:31 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.75';
+ $VERSION = '0.79';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: trunk/libauthen-cas-client-perl/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/inc/Module/Install/Makefile.pm?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/inc/Module/Install/Makefile.pm (original)
+++ trunk/libauthen-cas-client-perl/inc/Module/Install/Makefile.pm Fri May 8 15:51:31 2009
@@ -7,7 +7,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.75';
+ $VERSION = '0.79';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
@@ -36,9 +36,9 @@
sub makemaker_args {
my $self = shift;
- my $args = ($self->{makemaker_args} ||= {});
- %$args = ( %$args, @_ ) if @_;
- $args;
+ my $args = ( $self->{makemaker_args} ||= {} );
+ %$args = ( %$args, @_ );
+ return $args;
}
# For mm args that take multiple space-seperated args,
@@ -64,7 +64,7 @@
my $self = shift;
my $clean = $self->makemaker_args->{clean} ||= {};
%$clean = (
- %$clean,
+ %$clean,
FILES => join ' ', grep { length $_ } ($clean->{FILES} || (), @_),
);
}
@@ -73,7 +73,7 @@
my $self = shift;
my $realclean = $self->makemaker_args->{realclean} ||= {};
%$realclean = (
- %$realclean,
+ %$realclean,
FILES => join ' ', grep { length $_ } ($realclean->{FILES} || (), @_),
);
}
@@ -116,9 +116,15 @@
# Make sure we have a new enough
require ExtUtils::MakeMaker;
- $self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION );
-
- # Generate the
+
+ # MakeMaker can complain about module versions that include
+ # an underscore, even though its own version may contain one!
+ # Hence the funny regexp to get rid of it. See RT #35800
+ # for details.
+
+ $self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
+
+ # Generate the
my $args = $self->makemaker_args;
$args->{DISTNAME} = $self->name;
$args->{NAME} = $self->module_name || $self->name;
@@ -175,7 +181,9 @@
my $user_preop = delete $args{dist}->{PREOP};
if (my $preop = $self->admin->preop($user_preop)) {
- $args{dist} = $preop;
+ foreach my $key ( keys %$preop ) {
+ $args{dist}->{$key} = $preop->{$key};
+ }
}
my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
@@ -188,7 +196,7 @@
my $top_class = ref($self->_top) || '';
my $top_version = $self->_top->VERSION || '';
- my $preamble = $self->preamble
+ my $preamble = $self->preamble
? "# Preamble by $top_class $top_version\n"
. $self->preamble
: '';
@@ -242,4 +250,4 @@
__END__
-#line 371
+#line 379
Modified: trunk/libauthen-cas-client-perl/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/inc/Module/Install/Metadata.pm?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/inc/Module/Install/Metadata.pm (original)
+++ trunk/libauthen-cas-client-perl/inc/Module/Install/Metadata.pm Fri May 8 15:51:31 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.75';
+ $VERSION = '0.79';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
@@ -17,9 +17,7 @@
abstract
author
version
- license
distribution_type
- perl_version
tests
installdirs
};
@@ -33,11 +31,18 @@
resources
};
-sub Meta { shift }
-sub Meta_ScalarKeys { @scalar_keys }
-sub Meta_TupleKeys { @tuple_keys }
-
-foreach my $key (@scalar_keys) {
+my @resource_keys = qw{
+ homepage
+ bugtracker
+ repository
+};
+
+sub Meta { shift }
+sub Meta_ScalarKeys { @scalar_keys }
+sub Meta_TupleKeys { @tuple_keys }
+sub Meta_ResourceKeys { @resource_keys }
+
+foreach my $key ( @scalar_keys ) {
*$key = sub {
my $self = shift;
return $self->{values}{$key} if defined wantarray and !@_;
@@ -46,12 +51,30 @@
};
}
+foreach my $key ( @resource_keys ) {
+ *$key = sub {
+ my $self = shift;
+ unless ( @_ ) {
+ return () unless $self->{values}{resources};
+ return map { $_->[1] }
+ grep { $_->[0] eq $key }
+ @{ $self->{values}{resources} };
+ }
+ return $self->{values}{resources}{$key} unless @_;
+ my $uri = shift or die(
+ "Did not provide a value to $key()"
+ );
+ $self->resources( $key => $uri );
+ return 1;
+ };
+}
+
sub requires {
my $self = shift;
while ( @_ ) {
my $module = shift or last;
my $version = shift || 0;
- push @{ $self->{values}->{requires} }, [ $module, $version ];
+ push @{ $self->{values}{requires} }, [ $module, $version ];
}
$self->{values}{requires};
}
@@ -61,7 +84,7 @@
while ( @_ ) {
my $module = shift or last;
my $version = shift || 0;
- push @{ $self->{values}->{build_requires} }, [ $module, $version ];
+ push @{ $self->{values}{build_requires} }, [ $module, $version ];
}
$self->{values}{build_requires};
}
@@ -71,9 +94,9 @@
while ( @_ ) {
my $module = shift or last;
my $version = shift || 0;
- push @{ $self->{values}->{configure_requires} }, [ $module, $version ];
- }
- $self->{values}->{configure_requires};
+ push @{ $self->{values}{configure_requires} }, [ $module, $version ];
+ }
+ $self->{values}{configure_requires};
}
sub recommends {
@@ -81,9 +104,9 @@
while ( @_ ) {
my $module = shift or last;
my $version = shift || 0;
- push @{ $self->{values}->{recommends} }, [ $module, $version ];
- }
- $self->{values}->{recommends};
+ push @{ $self->{values}{recommends} }, [ $module, $version ];
+ }
+ $self->{values}{recommends};
}
sub bundles {
@@ -91,26 +114,31 @@
while ( @_ ) {
my $module = shift or last;
my $version = shift || 0;
- push @{ $self->{values}->{bundles} }, [ $module, $version ];
- }
- $self->{values}->{bundles};
+ push @{ $self->{values}{bundles} }, [ $module, $version ];
+ }
+ $self->{values}{bundles};
}
# Resource handling
+my %lc_resource = map { $_ => 1 } qw{
+ homepage
+ license
+ bugtracker
+ repository
+};
+
sub resources {
my $self = shift;
while ( @_ ) {
- my $resource = shift or last;
- my $value = shift or next;
- push @{ $self->{values}->{resources} }, [ $resource, $value ];
- }
- $self->{values}->{resources};
-}
-
-sub repository {
- my $self = shift;
- $self->resources( repository => shift );
- return 1;
+ my $name = shift or last;
+ my $value = shift or next;
+ if ( $name eq lc $name and ! $lc_resource{$name} ) {
+ die("Unsupported reserved lowercase resource '$name'");
+ }
+ $self->{values}{resources} ||= [];
+ push @{ $self->{values}{resources} }, [ $name, $value ];
+ }
+ $self->{values}{resources};
}
# Aliases for build_requires that will have alternative
@@ -126,30 +154,70 @@
sub sign {
my $self = shift;
- return $self->{'values'}{'sign'} if defined wantarray and ! @_;
- $self->{'values'}{'sign'} = ( @_ ? $_[0] : 1 );
+ return $self->{values}{sign} if defined wantarray and ! @_;
+ $self->{values}{sign} = ( @_ ? $_[0] : 1 );
return $self;
}
sub dynamic_config {
my $self = shift;
unless ( @_ ) {
- warn "You MUST provide an explicit true/false value to dynamic_config, skipping\n";
+ warn "You MUST provide an explicit true/false value to dynamic_config\n";
return $self;
}
$self->{values}{dynamic_config} = $_[0] ? 1 : 0;
- return $self;
+ return 1;
+}
+
+sub perl_version {
+ my $self = shift;
+ return $self->{values}{perl_version} unless @_;
+ my $version = shift or die(
+ "Did not provide a value to perl_version()"
+ );
+
+ # Normalize the version
+ $version = $self->_perl_version($version);
+
+ # We don't support the reall old versions
+ unless ( $version >= 5.005 ) {
+ die "Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker)\n";
+ }
+
+ $self->{values}{perl_version} = $version;
+}
+
+sub license {
+ my $self = shift;
+ return $self->{values}{license} unless @_;
+ my $license = shift or die(
+ 'Did not provide a value to license()'
+ );
+ $self->{values}{license} = $license;
+
+ # Automatically fill in license URLs
+ if ( $license eq 'perl' ) {
+ $self->resources( license => 'http://dev.perl.org/licenses/' );
+ }
+
+ return 1;
}
sub all_from {
my ( $self, $file ) = @_;
unless ( defined($file) ) {
- my $name = $self->name
- or die "all_from called with no args without setting name() first";
+ my $name = $self->name or die(
+ "all_from called with no args without setting name() first"
+ );
$file = join('/', 'lib', split(/-/, $name)) . '.pm';
$file =~ s{.*/}{} unless -e $file;
- die "all_from: cannot find $file from $name" unless -e $file;
+ unless ( -e $file ) {
+ die("all_from cannot find $file from $name");
+ }
+ }
+ unless ( -f $file ) {
+ die("The path '$file' does not exist, or is not a file");
}
# Some methods pull from POD instead of code.
@@ -228,8 +296,8 @@
while ( my ( $name, $mods ) = splice( @_, 0, 2 ) ) {
$self->feature( $name, @$mods );
}
- return $self->{values}->{features}
- ? @{ $self->{values}->{features} }
+ return $self->{values}{features}
+ ? @{ $self->{values}{features} }
: ();
}
@@ -303,7 +371,7 @@
$self->module_name($module_name);
}
} else {
- die "Cannot determine name from $file\n";
+ die("Cannot determine name from $file\n");
}
}
@@ -362,8 +430,12 @@
my $license_text = $1;
my @phrases = (
'under the same (?:terms|license) as perl itself' => 'perl', 1,
+ 'GNU general public license' => 'gpl', 1,
'GNU public license' => 'gpl', 1,
+ 'GNU lesser general public license' => 'lgpl', 1,
'GNU lesser public license' => 'lgpl', 1,
+ 'GNU library general public license' => 'lgpl', 1,
+ 'GNU library public license' => 'lgpl', 1,
'BSD license' => 'bsd', 1,
'Artistic license' => 'artistic', 1,
'GPL' => 'gpl', 1,
@@ -376,9 +448,6 @@
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s{\s+}{\\s+}g;
if ( $license_text =~ /\b$pattern\b/i ) {
- if ( $osi and $license_text =~ /All rights reserved/i ) {
- print "WARNING: 'All rights reserved' in copyright may invalidate Open Source license.\n";
- }
$self->license($license);
return 1;
}
@@ -389,19 +458,88 @@
return 'unknown';
}
-sub install_script {
- my $self = shift;
- my $args = $self->makemaker_args;
- my $exe = $args->{EXE_FILES} ||= [];
- foreach ( @_ ) {
- if ( -f $_ ) {
- push @$exe, $_;
- } elsif ( -d 'script' and -f "script/$_" ) {
- push @$exe, "script/$_";
- } else {
- die "Cannot find script '$_'";
- }
- }
+sub bugtracker_from {
+ my $self = shift;
+ my $content = Module::Install::_read($_[0]);
+ my @links = $content =~ m/L\<(http\:\/\/rt\.cpan\.org\/[^>]+)\>/g;
+ unless ( @links ) {
+ warn "Cannot determine bugtracker info from $_[0]\n";
+ return 0;
+ }
+ if ( @links > 1 ) {
+ warn "Found more than on rt.cpan.org link in $_[0]\n";
+ return 0;
+ }
+
+ # Set the bugtracker
+ bugtracker( $links[0] );
+ return 1;
+}
+
+# Convert triple-part versions (eg, 5.6.1 or 5.8.9) to
+# numbers (eg, 5.006001 or 5.008009).
+# Also, convert double-part versions (eg, 5.8)
+sub _perl_version {
+ my $v = $_[-1];
+ $v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e;
+ $v =~ s/^([1-9])\.([1-9]\d?\d?)\.(0|[1-9]\d?\d?)$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e;
+ $v =~ s/(\.\d\d\d)000$/$1/;
+ $v =~ s/_.+$//;
+ if ( ref($v) ) {
+ $v = $v + 0; # Numify
+ }
+ return $v;
+}
+
+
+
+
+
+######################################################################
+# MYMETA.yml Support
+
+sub WriteMyMeta {
+ $_[0]->write_mymeta;
+}
+
+sub write_mymeta {
+ my $self = shift;
+
+ # If there's no existing META.yml there is nothing we can do
+ return unless -f 'META.yml';
+
+ # Merge the perl version into the dependencies
+ my $val = $self->Meta->{values};
+ my $perl = delete $val->{perl_version};
+ if ( $perl ) {
+ $val->{requires} ||= [];
+ my $requires = $val->{requires};
+
+ # Canonize to three-dot version after Perl 5.6
+ if ( $perl >= 5.006 ) {
+ $perl =~ s{^(\d+)\.(\d\d\d)(\d*)}{join('.', $1, int($2||0), int($3||0))}e
+ }
+ unshift @$requires, [ perl => $perl ];
+ }
+
+ # Load the advisory META.yml file
+ require YAML::Tiny;
+ my @yaml = YAML::Tiny::LoadFile('META.yml');
+ my $meta = $yaml[0];
+
+ # Overwrite the non-configure dependency hashs
+ delete $meta->{requires};
+ delete $meta->{build_requires};
+ delete $meta->{recommends};
+ if ( exists $val->{requires} ) {
+ $meta->{requires} = { map { @$_ } @{ $val->{requires} } };
+ }
+ if ( exists $val->{build_requires} ) {
+ $meta->{build_requires} = { map { @$_ } @{ $val->{build_requires} } };
+ }
+
+ # Save as the MYMETA.yml file
+ YAML::Tiny::DumpFile('MYMETA.yml', $meta);
}
1;
Modified: trunk/libauthen-cas-client-perl/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/inc/Module/Install/Win32.pm?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/inc/Module/Install/Win32.pm (original)
+++ trunk/libauthen-cas-client-perl/inc/Module/Install/Win32.pm Fri May 8 15:51:31 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.75';
+ $VERSION = '0.79';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
Modified: trunk/libauthen-cas-client-perl/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/inc/Module/Install/WriteAll.pm?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/inc/Module/Install/WriteAll.pm (original)
+++ trunk/libauthen-cas-client-perl/inc/Module/Install/WriteAll.pm Fri May 8 15:51:31 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.75';
+ $VERSION = '0.79';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
Modified: trunk/libauthen-cas-client-perl/lib/Authen/CAS/Client.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/lib/Authen/CAS/Client.pm?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/lib/Authen/CAS/Client.pm (original)
+++ trunk/libauthen-cas-client-perl/lib/Authen/CAS/Client.pm Fri May 8 15:51:31 2009
@@ -1,6 +1,6 @@
package Authen::CAS::Client;
-# $Id: Client.pm 26 2008-06-24 15:32:22Z jhord $
+# $Id: Client.pm 32 2009-05-05 19:15:42Z jhord $
require 5.006_001;
@@ -13,7 +13,7 @@
use XML::LibXML;
use Authen::CAS::Client::Response;
-our $VERSION = '0.03';
+our $VERSION = '0.04';
#======================================================================
# constructor
@@ -39,11 +39,10 @@
sub _error {
my ( $self, $error ) = @_;
- my $response = Authen::CAS::Client::Response::Error->new( error => $error );
- die $response
+ die $error
if $self->{_fatal};
- $response;
+ Authen::CAS::Client::Response::Error->new( error => $error );
}
sub _parse_auth_response {
@@ -369,11 +368,10 @@
=item * fatal =E<gt> $BOOLEAN
-If this argument is true, the CAS client will C<die()> with an
-C<Authen::CAS::Client::Response::Error> object whenever an error
-occurs. Otherwise an C<Authen::CAS::Client::Response::Error>
-object is returned, instead. See L<Authen::CAS::Client::Response>
-for more detail on response objects.
+If this argument is true, the CAS client will C<die()> when an error
+occurs and C<$@> will contain the error message. Otherwise an
+C<Authen::CAS::Client::Response::Error> object will be returned. See
+L<Authen::CAS::Client::Response> for more detail on response objects.
=back
@@ -515,7 +513,7 @@
=head1 COPYRIGHT
-Copyright (c) 2007, 2008, jason hord
+Copyright (c) 2007-2009, jason hord
All rights reserved.
Modified: trunk/libauthen-cas-client-perl/lib/Authen/CAS/Client/Response.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/lib/Authen/CAS/Client/Response.pm?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/lib/Authen/CAS/Client/Response.pm (original)
+++ trunk/libauthen-cas-client-perl/lib/Authen/CAS/Client/Response.pm Fri May 8 15:51:31 2009
@@ -3,7 +3,7 @@
use strict;
use warnings;
-# $Id: Response.pm 26 2008-06-24 15:32:22Z jhord $
+# $Id: Response.pm 32 2009-05-05 19:15:42Z jhord $
#======================================================================
# Authen::CAS::Client::Response
@@ -306,7 +306,7 @@
=head1 COPYRIGHT
-Copyright (c) 2007, 2008, jason hord
+Copyright (c) 2007-2009, jason hord
All rights reserved.
Modified: trunk/libauthen-cas-client-perl/t/04-fatal.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-cas-client-perl/t/04-fatal.t?rev=35044&op=diff
==============================================================================
--- trunk/libauthen-cas-client-perl/t/04-fatal.t (original)
+++ trunk/libauthen-cas-client-perl/t/04-fatal.t Fri May 8 15:51:31 2009
@@ -2,7 +2,7 @@
use lib '.';
-use Test::More tests => 2;
+use Test::More tests => 1;
use t::MockUserAgent;
use Authen::CAS::Client;
@@ -16,5 +16,4 @@
$mock->_response( 404, 'Not found' );
eval { $cas->validate( 'S', 'T' ) };
-ok( UNIVERSAL::isa( $@, 'Authen::CAS::Client::Response::Error' ), "fatal" );
-like( $@->error(), qr/^HTTP request failed: \d+: / );
+like( $@, qr/^HTTP request failed: \d+: / );
More information about the Pkg-perl-cvs-commits
mailing list