r53110 - /trunk/dh-make-perl/lib/DhMakePerl.pm

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Sat Feb 20 21:22:47 UTC 2010


Author: dmn
Date: Sat Feb 20 21:22:42 2010
New Revision: 53110

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=53110
Log:
convert $startdir to object accessor

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

Modified: trunk/dh-make-perl/lib/DhMakePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl.pm?rev=53110&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Sat Feb 20 21:22:42 2010
@@ -10,7 +10,7 @@
 __PACKAGE__->mk_accessors(
     qw(
         cfg apt_contents main_dir debian_dir meta bdepends bdependsi depends
-        priority section maintainer arch
+        priority section maintainer arch start_dir
         )
 );
 
@@ -76,9 +76,6 @@
 # TODO:
 # * get more info from the package (maybe using CPAN methods)
 
-my (
-    $startdir,
-);
 our %overrides;
 
 use constant debstdversion => '3.8.4';
@@ -93,6 +90,7 @@
     depends   => Debian::Dependencies->new('${perl:Depends}'),
     priority  => 'optional',
     section   => 'perl',
+    start_dir => getcwd(),
 );
 
 sub new {
@@ -107,8 +105,6 @@
 
     return $self;
 }
-
-$startdir  = getcwd();
 
 # If we're being required rather than called as a main command, then
 # return now without doing any work.  This facilitates easier testing.
@@ -623,8 +619,9 @@
 
     $debname = "${pkgname}_$version-1_$archspec.deb";
 
-    system("dpkg -i $startdir/$debname") == 0
-        || die "Cannot install package $startdir/$debname\n";
+    my $deb = $self->start_dir . "/$debname";
+    system("dpkg -i $deb") == 0
+        || die "Cannot install package $deb\n";
 }
 
 sub process_meta {




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