r34663 - in /trunk/dh-make-perl: debian/changelog lib/DhMakePerl.pm

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Sat May 2 17:18:40 UTC 2009


Author: dmn
Date: Sat May  2 17:18:35 2009
New Revision: 34663

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=34663
Log:
remove code supporting CPAN < 1.9205

this is what is shipped with perl-modules 5.10 (on which we already depend)

Modified:
    trunk/dh-make-perl/debian/changelog
    trunk/dh-make-perl/lib/DhMakePerl.pm

Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/changelog?rev=34663&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Sat May  2 17:18:35 2009
@@ -16,6 +16,8 @@
 
   [ Damyan Ivanov ]
   * add 'make' to the list of commands
+  * remove code supporting CPAN < 1.9205, which is what ships with
+    perl-modules 5.10 (on which we already depend)
 
  -- gregor herrmann <gregoa at debian.org>  Mon, 27 Apr 2009 16:42:59 +0200
 

Modified: trunk/dh-make-perl/lib/DhMakePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl.pm?rev=34663&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Sat May  2 17:18:35 2009
@@ -356,7 +356,7 @@
 sub setup_dir {
     my ($self) = @_;
 
-    my ( $dist, $mod, $cpanversion, $tarball );
+    my ( $dist, $mod, $tarball );
     $mod_cpan_version = '';
     if ( $self->cfg->cpan ) {
         my ($new_maindir);
@@ -405,35 +405,21 @@
         }
         $mod              = shift @mod unless ($mod);
         $mod_cpan_version = $mod->cpan_version;
-        $cpanversion      = $CPAN::VERSION;
-        $cpanversion =~ s/_.*//;
 
         $tarball = $CPAN::Config->{'keep_source_where'} . "/authors/id/";
 
-        if ( $cpanversion < 1.59 ) {    # wild guess on the version number
-            $dist = $CPAN::META->instance( 'CPAN::Distribution',
-                $mod->{CPAN_FILE} );
-            $dist->get || die "Cannot get $mod->{CPAN_FILE}\n";
-            $tarball .= $mod->{CPAN_FILE};
-            $maindir = $dist->{'build_dir'};
-        }
-        else {
-
-            # CPAN internals changed
-            $dist = $CPAN::META->instance( 'CPAN::Distribution',
-                $mod->cpan_file );
-            $dist->get || die "Cannot get ", $mod->cpan_file, "\n";
-            $tarball .= $mod->cpan_file;
-            $maindir = $dist->dir;
-        }
+        $dist = $CPAN::META->instance( 'CPAN::Distribution',
+            $mod->cpan_file );
+        $dist->get || die "Cannot get ", $mod->cpan_file, "\n";
+        $tarball .= $mod->cpan_file;
+        $maindir = $dist->dir;
 
         copy( $tarball, $ENV{'PWD'} );
         $tarball = $ENV{'PWD'} . "/" . basename($tarball);
 
         # build_dir contains a random part since 1.88_59
         # use the new CPAN::Distribution::base_id (introduced in 1.91_53)
-        $new_maindir = $ENV{PWD} . "/"
-            . ( $cpanversion < 1.9153 ? basename($maindir) : $dist->base_id );
+        $new_maindir = $ENV{PWD} . "/" . $dist->base_id;
 
         # rename existing directory
         if ( -d $new_maindir




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