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

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


Author: dmn
Date: Sat Feb 20 21:20:52 2010
New Revision: 53102

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=53102
Log:
convert $section 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=53102&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Sat Feb 20 21:20:52 2010
@@ -8,7 +8,7 @@
 use Pod::Usage;
 
 __PACKAGE__->mk_accessors(
-    qw( cfg apt_contents main_dir debian_dir meta priority ));
+    qw( cfg apt_contents main_dir debian_dir meta priority section ));
 
 =head1 NAME
 
@@ -73,7 +73,7 @@
 # * get more info from the package (maybe using CPAN methods)
 
 my (
-    $section,             $depends,       $bdepends,
+    $depends,       $bdepends,
     $bdependsi,           $maintainer,    $arch,
     $closes,              $date,
     $startdir,
@@ -81,7 +81,6 @@
 our %overrides;
 
 use constant debstdversion => '3.8.4';
-$section       = 'perl';
 $depends       = Debian::Dependencies->new('${perl:Depends}');
 
 # this is the version in 'oldstable'. No much point on depending on something
@@ -90,6 +89,7 @@
 
 our %DEFAULTS = (
     priority => 'optional',
+    section  => 'perl',
 );
 
 sub new {
@@ -1527,7 +1527,7 @@
     }
 
     $fh->print("Source: $srcname\n");
-    $fh->print("Section: $section\n");
+    $fh->printf("Section: %s\n", $self->section );
     $fh->printf( "Priority: %s\n", $self->priority );
     local $Text::Wrap::break     = ', ';
     local $Text::Wrap::separator = ",\n";
@@ -1958,7 +1958,7 @@
             $val = $self->get_override_val( $data, $subkey, 'srcname' )
         )
         );
-    $section = $val
+    $self->section($val)
         if (
         defined(
             $val = $self->get_override_val( $data, $subkey, 'section' )




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