r45228 - in /branches/upstream/libclass-accessor-grouped-perl/current: ./ inc/Module/Install/ lib/Class/Accessor/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Fri Oct 2 13:04:02 UTC 2009


Author: jawnsy-guest
Date: Fri Oct  2 13:03:40 2009
New Revision: 45228

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=45228
Log:
[svn-upgrade] Integrating new upstream version, libclass-accessor-grouped-perl (0.09001)

Added:
    branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/Can.pm
    branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/Fetch.pm
    branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/Win32.pm
    branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/WriteAll.pm
Removed:
    branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/MakeMaker.pm
Modified:
    branches/upstream/libclass-accessor-grouped-perl/current/Changes
    branches/upstream/libclass-accessor-grouped-perl/current/MANIFEST
    branches/upstream/libclass-accessor-grouped-perl/current/META.yml
    branches/upstream/libclass-accessor-grouped-perl/current/Makefile.PL
    branches/upstream/libclass-accessor-grouped-perl/current/README
    branches/upstream/libclass-accessor-grouped-perl/current/lib/Class/Accessor/Grouped.pm

Modified: branches/upstream/libclass-accessor-grouped-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclass-accessor-grouped-perl/current/Changes?rev=45228&op=diff
==============================================================================
--- branches/upstream/libclass-accessor-grouped-perl/current/Changes (original)
+++ branches/upstream/libclass-accessor-grouped-perl/current/Changes Fri Oct  2 13:03:40 2009
@@ -1,4 +1,7 @@
 Revision history for Class::Accessor::Grouped.
+
+0.09001 Thu Oct  1 21:48:06 2009
+    - remove optional dep from Makefile.PL
 
 0.09000 Sun Aug 23 20:08:09 2009
     - release

Modified: branches/upstream/libclass-accessor-grouped-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclass-accessor-grouped-perl/current/MANIFEST?rev=45228&op=diff
==============================================================================
--- branches/upstream/libclass-accessor-grouped-perl/current/MANIFEST (original)
+++ branches/upstream/libclass-accessor-grouped-perl/current/MANIFEST Fri Oct  2 13:03:40 2009
@@ -3,10 +3,13 @@
 inc/Module/Install.pm
 inc/Module/Install/AutoInstall.pm
 inc/Module/Install/Base.pm
+inc/Module/Install/Can.pm
+inc/Module/Install/Fetch.pm
 inc/Module/Install/Include.pm
 inc/Module/Install/Makefile.pm
-inc/Module/Install/MakeMaker.pm
 inc/Module/Install/Metadata.pm
+inc/Module/Install/Win32.pm
+inc/Module/Install/WriteAll.pm
 lib/Class/Accessor/Grouped.pm
 Makefile.PL
 MANIFEST			This list of files

Modified: branches/upstream/libclass-accessor-grouped-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclass-accessor-grouped-perl/current/META.yml?rev=45228&op=diff
==============================================================================
--- branches/upstream/libclass-accessor-grouped-perl/current/META.yml (original)
+++ branches/upstream/libclass-accessor-grouped-perl/current/META.yml Fri Oct  2 13:03:40 2009
@@ -18,13 +18,19 @@
   directory:
     - inc
     - t
+provides:
+  Class::Accessor::Grouped:
+    file: lib/Class/Accessor/Grouped.pm
+    version: 0.09001
 requires:
   Carp: 0
   Class::Inspector: 0
+  Class::XSAccessor: 0
   MRO::Compat: 0
   Scalar::Util: 0
   Sub::Name: 0.04
   perl: 5.6.1
 resources:
   license: http://dev.perl.org/licenses/
-version: 0.09000
+  repository: http://dev.catalyst.perl.org/repos/bast/trunk/Class-Accessor-Grouped/
+version: 0.09001

Modified: branches/upstream/libclass-accessor-grouped-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclass-accessor-grouped-perl/current/Makefile.PL?rev=45228&op=diff
==============================================================================
--- branches/upstream/libclass-accessor-grouped-perl/current/Makefile.PL (original)
+++ branches/upstream/libclass-accessor-grouped-perl/current/Makefile.PL Fri Oct  2 13:03:40 2009
@@ -1,4 +1,4 @@
-# $Id: Makefile.PL 7003 2009-07-08 02:24:06Z claco $
+# $Id: Makefile.PL 7752 2009-10-01 22:10:04Z caelum $
 use strict;
 use warnings;
 use inc::Module::Install 0.91;
@@ -13,20 +13,20 @@
 requires 'MRO::Compat';
 requires 'Class::Inspector';
 requires 'Sub::Name' => '0.04';
-
-feature 'XS Accessor Support',
-  -default => 0,
-  'Class::XSAccessor' => 0;
-
+requires 'Class::XSAccessor';
 
 test_requires 'Sub::Identify';
 
 clean_files "Class-Accessor-Grouped-* t/var";
 
+if (-e 'MANIFEST.SKIP') {
+    system('pod2text lib/Class/Accessor/Grouped.pm > README');
+}
+
+auto_provides;
 auto_install;
 
-WriteMakefile(
-  dist => {
-    PREOP => 'pod2text lib/Class/Accessor/Grouped.pm > README'
-  }
-);
+resources repository =>
+'http://dev.catalyst.perl.org/repos/bast/trunk/Class-Accessor-Grouped/';
+
+WriteAll;

Modified: branches/upstream/libclass-accessor-grouped-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclass-accessor-grouped-perl/current/README?rev=45228&op=diff
==============================================================================
--- branches/upstream/libclass-accessor-grouped-perl/current/README (original)
+++ branches/upstream/libclass-accessor-grouped-perl/current/README Fri Oct  2 13:03:40 2009
@@ -30,16 +30,16 @@
         Returns: none
 
     Creates a set of read only accessors in a given group. Identical to
-    <L:/mk_group_accessors> but accessors will throw an error if passed a
-    value rather than setting the value.
+    "mk_group_accessors" but accessors will throw an error if passed a value
+    rather than setting the value.
 
   mk_group_wo_accessors
     Arguments: $group, @fieldspec
         Returns: none
 
     Creates a set of write only accessors in a given group. Identical to
-    <L:/mk_group_accessors> but accessors will throw an error if not passed
-    a value rather than getting the value.
+    "mk_group_accessors" but accessors will throw an error if not passed a
+    value rather than getting the value.
 
   make_group_accessor
     Arguments: $group, $field
@@ -136,6 +136,9 @@
 
     Guillermo Roditi <groditi at cpan.org>
 
-LICENSE
-    You may distribute this code under the same terms as Perl itself.
+COPYRIGHT & LICENSE
+    Copyright (c) 2006-2009 Matt S. Trout <mst at shadowcatsystems.co.uk>
 
+    This program is free software; you can redistribute it and/or modify it
+    under the same terms as perl itself.
+

Added: branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/Can.pm?rev=45228&op=file
==============================================================================
--- branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/Can.pm (added)
+++ branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/Can.pm Fri Oct  2 13:03:40 2009
@@ -1,0 +1,81 @@
+#line 1
+package Module::Install::Can;
+
+use strict;
+use Config                ();
+use File::Spec            ();
+use ExtUtils::MakeMaker   ();
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
+BEGIN {
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
+	$ISCORE  = 1;
+}
+
+# check if we can load some module
+### Upgrade this to not have to load the module if possible
+sub can_use {
+	my ($self, $mod, $ver) = @_;
+	$mod =~ s{::|\\}{/}g;
+	$mod .= '.pm' unless $mod =~ /\.pm$/i;
+
+	my $pkg = $mod;
+	$pkg =~ s{/}{::}g;
+	$pkg =~ s{\.pm$}{}i;
+
+	local $@;
+	eval { require $mod; $pkg->VERSION($ver || 0); 1 };
+}
+
+# check if we can run some command
+sub can_run {
+	my ($self, $cmd) = @_;
+
+	my $_cmd = $cmd;
+	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));
+	}
+
+	return;
+}
+
+# can we locate a (the) C compiler
+sub can_cc {
+	my $self   = shift;
+	my @chunks = split(/ /, $Config::Config{cc}) or return;
+
+	# $Config{cc} may contain args; try to find out the program part
+	while (@chunks) {
+		return $self->can_run("@chunks") || (pop(@chunks), next);
+	}
+
+	return;
+}
+
+# Fix Cygwin bug on maybe_command();
+if ( $^O eq 'cygwin' ) {
+	require ExtUtils::MM_Cygwin;
+	require ExtUtils::MM_Win32;
+	if ( ! defined(&ExtUtils::MM_Cygwin::maybe_command) ) {
+		*ExtUtils::MM_Cygwin::maybe_command = sub {
+			my ($self, $file) = @_;
+			if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
+				ExtUtils::MM_Win32->maybe_command($file);
+			} else {
+				ExtUtils::MM_Unix->maybe_command($file);
+			}
+		}
+	}
+}
+
+1;
+
+__END__
+
+#line 156

Added: branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/Fetch.pm?rev=45228&op=file
==============================================================================
--- branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/Fetch.pm (added)
+++ branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/Fetch.pm Fri Oct  2 13:03:40 2009
@@ -1,0 +1,93 @@
+#line 1
+package Module::Install::Fetch;
+
+use strict;
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
+BEGIN {
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
+	$ISCORE  = 1;
+}
+
+sub get_file {
+    my ($self, %args) = @_;
+    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) =
+            $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
+    }
+
+    $|++;
+    print "Fetching '$file' from $host... ";
+
+    unless (eval { require Socket; Socket::inet_aton($host) }) {
+        warn "'$host' resolve failed!\n";
+        return;
+    }
+
+    return unless $scheme eq 'ftp' or $scheme eq 'http';
+
+    require Cwd;
+    my $dir = Cwd::getcwd();
+    chdir $args{local_dir} or return if exists $args{local_dir};
+
+    if (eval { require LWP::Simple; 1 }) {
+        LWP::Simple::mirror($args{url}, $file);
+    }
+    elsif (eval { require Net::FTP; 1 }) { eval {
+        # use Net::FTP to get past firewall
+        my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
+        $ftp->login("anonymous", 'anonymous at example.com');
+        $ftp->cwd($path);
+        $ftp->binary;
+        $ftp->get($file) or (warn("$!\n"), return);
+        $ftp->quit;
+    } }
+    elsif (my $ftp = $self->can_run('ftp')) { eval {
+        # no Net::FTP, fallback to ftp.exe
+        require FileHandle;
+        my $fh = FileHandle->new;
+
+        local $SIG{CHLD} = 'IGNORE';
+        unless ($fh->open("|$ftp -n")) {
+            warn "Couldn't open ftp: $!\n";
+            chdir $dir; return;
+        }
+
+        my @dialog = split(/\n/, <<"END_FTP");
+open $host
+user anonymous anonymous\@example.com
+cd $path
+binary
+get $file $file
+quit
+END_FTP
+        foreach (@dialog) { $fh->print("$_\n") }
+        $fh->close;
+    } }
+    else {
+        warn "No working 'ftp' program available!\n";
+        chdir $dir; return;
+    }
+
+    unless (-f $file) {
+        warn "Fetching failed: $@\n";
+        chdir $dir; return;
+    }
+
+    return if exists $args{size} and -s $file != $args{size};
+    system($args{run}) if exists $args{run};
+    unlink($file) if $args{remove};
+
+    print(((!exists $args{check_for} or -e $args{check_for})
+        ? "done!" : "failed! ($!)"), "\n");
+    chdir $dir; return !$?;
+}
+
+1;

Added: branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/Win32.pm?rev=45228&op=file
==============================================================================
--- branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/Win32.pm (added)
+++ branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/Win32.pm Fri Oct  2 13:03:40 2009
@@ -1,0 +1,64 @@
+#line 1
+package Module::Install::Win32;
+
+use strict;
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
+BEGIN {
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
+	$ISCORE  = 1;
+}
+
+# determine if the user needs nmake, and download it if needed
+sub check_nmake {
+	my $self = shift;
+	$self->load('can_run');
+	$self->load('get_file');
+
+	require Config;
+	return unless (
+		$^O eq 'MSWin32'                     and
+		$Config::Config{make}                and
+		$Config::Config{make} =~ /^nmake\b/i and
+		! $self->can_run('nmake')
+	);
+
+	print "The required 'nmake' executable not found, fetching it...\n";
+
+	require File::Basename;
+	my $rv = $self->get_file(
+		url       => 'http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe',
+		ftp_url   => 'ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe',
+		local_dir => File::Basename::dirname($^X),
+		size      => 51928,
+		run       => 'Nmake15.exe /o > nul',
+		check_for => 'Nmake.exe',
+		remove    => 1,
+	);
+
+	die <<'END_MESSAGE' unless $rv;
+
+-------------------------------------------------------------------------------
+
+Since you are using Microsoft Windows, you will need the 'nmake' utility
+before installation. It's available at:
+
+  http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe
+      or
+  ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe
+
+Please download the file manually, save it to a directory in %PATH% (e.g.
+C:\WINDOWS\COMMAND\), then launch the MS-DOS command line shell, "cd" to
+that directory, and run "Nmake15.exe" from there; that will create the
+'nmake.exe' file needed by this module.
+
+You may then resume the installation process described in README.
+
+-------------------------------------------------------------------------------
+END_MESSAGE
+
+}
+
+1;

Added: branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/WriteAll.pm?rev=45228&op=file
==============================================================================
--- branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/WriteAll.pm (added)
+++ branches/upstream/libclass-accessor-grouped-perl/current/inc/Module/Install/WriteAll.pm Fri Oct  2 13:03:40 2009
@@ -1,0 +1,60 @@
+#line 1
+package Module::Install::WriteAll;
+
+use strict;
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
+BEGIN {
+	$VERSION = '0.91';;
+	@ISA     = qw{Module::Install::Base};
+	$ISCORE  = 1;
+}
+
+sub WriteAll {
+	my $self = shift;
+	my %args = (
+		meta        => 1,
+		sign        => 0,
+		inline      => 0,
+		check_nmake => 1,
+		@_,
+	);
+
+	$self->sign(1)                if $args{sign};
+	$self->admin->WriteAll(%args) if $self->is_admin;
+
+	$self->check_nmake if $args{check_nmake};
+	unless ( $self->makemaker_args->{PL_FILES} ) {
+		$self->makemaker_args( PL_FILES => {} );
+	}
+
+	# Until ExtUtils::MakeMaker support MYMETA.yml, make sure
+	# we clean it up properly ourself.
+	$self->realclean_files('MYMETA.yml');
+
+	if ( $args{inline} ) {
+		$self->Inline->write;
+	} else {
+		$self->Makefile->write;
+	}
+
+	# The Makefile write process adds a couple of dependencies,
+	# so write the META.yml files after the Makefile.
+	if ( $args{meta} ) {
+		$self->Meta->write;
+	}
+
+	# Experimental support for MYMETA
+	if ( $ENV{X_MYMETA} ) {
+		if ( $ENV{X_MYMETA} eq 'JSON' ) {
+			$self->Meta->write_mymeta_json;
+		} else {
+			$self->Meta->write_mymeta_yaml;
+		}
+	}
+
+	return 1;
+}
+
+1;

Modified: branches/upstream/libclass-accessor-grouped-perl/current/lib/Class/Accessor/Grouped.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libclass-accessor-grouped-perl/current/lib/Class/Accessor/Grouped.pm?rev=45228&op=diff
==============================================================================
--- branches/upstream/libclass-accessor-grouped-perl/current/lib/Class/Accessor/Grouped.pm (original)
+++ branches/upstream/libclass-accessor-grouped-perl/current/lib/Class/Accessor/Grouped.pm Fri Oct  2 13:03:40 2009
@@ -7,23 +7,8 @@
 use MRO::Compat;
 use Sub::Name ();
 
-our $VERSION = '0.09000';
-
-BEGIN {
-    our $hasXS;
-
-    sub _hasXS {
-        return $hasXS if defined $hasXS;
-    
-        $hasXS = 0;
-        eval {
-            require Class::XSAccessor;
-            $hasXS = 1;
-        };
-    
-        return $hasXS;
-    }
-}
+our $VERSION = '0.09001';
+$VERSION = eval $VERSION;
 
 =head1 NAME
 
@@ -129,7 +114,7 @@
 =back
 
 Creates a set of read only accessors in a given group. Identical to
-<L:/mk_group_accessors> but accessors will throw an error if passed a value
+L</mk_group_accessors> but accessors will throw an error if passed a value
 rather than setting the value.
 
 =cut
@@ -151,7 +136,7 @@
 =back
 
 Creates a set of write only accessors in a given group. Identical to
-<L:/mk_group_accessors> but accessors will throw an error if not passed a
+L</mk_group_accessors> but accessors will throw an error if not passed a
 value rather than getting the value.
 
 =cut
@@ -453,6 +438,24 @@
     return @{mro::get_linear_isa($class)};
 };
 
+# This is now a hard, rather than optional dep. Since we dep on Sub::Name, we no
+# longer care about not using XS modules.
+{
+    our $hasXS;
+
+    sub _hasXS {
+        return $hasXS if defined $hasXS;
+    
+        $hasXS = 0;
+        eval {
+            require Class::XSAccessor;
+            $hasXS = 1;
+        };
+    
+        return $hasXS;
+    }
+}
+
 1;
 
 =head1 AUTHORS
@@ -464,9 +467,11 @@
 
 Guillermo Roditi <groditi at cpan.org>
 
-=head1 LICENSE
-
-You may distribute this code under the same terms as Perl itself.
-
-=cut
-
+=head1 COPYRIGHT & LICENSE
+
+Copyright (c) 2006-2009 Matt S. Trout <mst at shadowcatsystems.co.uk>
+
+This program is free software; you can redistribute it and/or modify
+it under the same terms as perl itself.
+
+=cut




More information about the Pkg-perl-cvs-commits mailing list