[SCM] UNNAMED PROJECT branch, master, updated. 0.43-9-g7b6ab0b
Niels Thykier
niels at thykier.net
Thu Apr 25 18:54:47 UTC 2013
The following commit has been merged in the master branch:
commit 44352982407edfd3875db35e7c3e0062fdfaaaee
Author: Niels Thykier <niels at thykier.net>
Date: Thu Apr 25 18:35:55 2013 +0200
Bump the style of Perl scripts and dh-seq files
Signed-off-by: Niels Thykier <niels at thykier.net>
diff --git a/eclipse_helper.pm b/eclipse_helper.pm
index 6938174..2675fc2 100644
--- a/eclipse_helper.pm
+++ b/eclipse_helper.pm
@@ -1,18 +1,22 @@
# DH Sequence for eclipse helper.
+## no critic (Modules::RequireExplicitPackage)
+
use strict;
use warnings;
+use autodie;
+
use Debian::Debhelper::Dh_Lib;
# Build rules
-insert_after("dh_auto_build", "jh_setupenvironment");
-insert_after("jh_setupenvironment", "jh_generateorbitdir");
-insert_after("jh_generateorbitdir", "jh_compilefeatures");
+insert_after('dh_auto_build', 'jh_setupenvironment');
+insert_after('jh_setupenvironment', 'jh_generateorbitdir');
+insert_after('jh_generateorbitdir', 'jh_compilefeatures');
# Install rules
-insert_after("dh_install", "jh_installeclipse");
+insert_after('dh_install', 'jh_installeclipse');
# Clean rules
-insert_before("dh_clean", "jh_clean");
+insert_before('dh_clean', 'jh_clean');
1;
diff --git a/javahelper.pm b/javahelper.pm
index b2fe5fd..ecddf46 100644
--- a/javahelper.pm
+++ b/javahelper.pm
@@ -1,16 +1,21 @@
-#!/usr/bin/perl
+# DH Sequence for javahelper.
+
+## no critic (Modules::RequireExplicitPackage)
+
use warnings;
use strict;
+use autodie;
+
use Debian::Debhelper::Dh_Lib;
-insert_before("dh_compress", "jh_installlibs");
-insert_after("jh_installlibs", "jh_classpath");
-insert_after("jh_classpath", "jh_manifest");
-insert_after("jh_manifest", "jh_exec");
-insert_after("jh_exec", "jh_depends");
-insert_before("dh_installdocs", "jh_installjavadoc");
-insert_before("dh_clean", "jh_clean");
-insert_before("dh_auto_build", "jh_linkjars");
-insert_after("dh_auto_build", "jh_build");
+insert_before('dh_compress', 'jh_installlibs');
+insert_after('jh_installlibs', 'jh_classpath');
+insert_after('jh_classpath', 'jh_manifest');
+insert_after('jh_manifest', 'jh_exec');
+insert_after('jh_exec', 'jh_depends');
+insert_before('dh_installdocs', 'jh_installjavadoc');
+insert_before('dh_clean', 'jh_clean');
+insert_before('dh_auto_build', 'jh_linkjars');
+insert_after('dh_auto_build', 'jh_build');
1;
diff --git a/jh_compilefeatures b/jh_compilefeatures
index b3e79eb..7bd05ea 100755
--- a/jh_compilefeatures
+++ b/jh_compilefeatures
@@ -7,9 +7,13 @@ jh_compilefeatures - Compiles eclipse features using pde-build.
=cut
use strict;
+use warnings;
+use autodie;
+
use Cwd();
use Debian::Debhelper::Dh_Lib;
-use Debian::Javahelper::Eclipse;
+
+use Debian::Javahelper::Eclipse qw(install_zipped_feature);
=head1 SYNOPSIS
@@ -124,12 +128,12 @@ use.
my $pdebdir = undef;
my $ffile = 'debian/eclipse.features';
my @features = ();
-my $fdeps = "";
+my $fdeps = q{};
my $orbitdir = undef;
my $pdebcmd = undef;
my $bopts = undef;
-my $pdeargs = "";
-my $jvmargs = "";
+my $pdeargs = q{};
+my $jvmargs = q{};
my $ignoreJH = 0;
init(options => {
'pde-build-dir=s' => \$pdebdir,
@@ -142,7 +146,8 @@ init(options => {
'ignore-java-home' => \$ignoreJH,
});
-error("pde-build uses ant, therefore JAVA_HOME must be set.") unless(($ENV{'JAVA_HOME'}//'') ne '' or $ignoreJH);
+error('pde-build uses ant, therefore JAVA_HOME must be set.')
+ unless(($ENV{'JAVA_HOME'}//q{}) ne q{} or $ignoreJH);
# Use default value if none are given.
$pdebdir = 'debian/.eclipse-build' unless(defined($pdebdir));
@@ -160,10 +165,11 @@ if( -e $ffile){
@features = filedoublearray($ffile);
}
-error("$pdebdir does not exist") if(scalar(@ARGV) + scalar(@features) > 0 && ! -d $pdebdir);
+error("$pdebdir does not exist")
+ if(scalar(@ARGV) + scalar(@features) > 0 && ! -d $pdebdir);
foreach my $arg (@ARGV){
- compile($arg, split(/\s+/o, $fdeps));
+ compile($arg, split(m/\s++/o, $fdeps));
}
foreach my $feat (@features){
@@ -178,7 +184,7 @@ sub compile{
my @deps = ();
DEP_LOOP: foreach my $d (@_){
# Check if we just built this feature.
- foreach my $s ('', '.zip', '.ZIP') {
+ foreach my $s (q{}, '.zip', '.ZIP') {
my $zip = "$pdebdir/$d$s";
if( -e $zip ){
install_zipped_feature($zip, "$pdebdir/build/SDK");
@@ -187,12 +193,12 @@ sub compile{
}
push(@deps, $d);
}
- push(@args, "-o", escape_shell($orbitdir)) if(defined($orbitdir) && -d $orbitdir);
- push(@args, "-j", escape_shell($jvmargs)) if($jvmargs ne '');
- push(@args, "-a", escape_shell($bopts)) if($bopts ne '');
- push(@args, "-d", escape_shell(join(' ', @deps))) if(scalar(@deps) > 0);
+ push(@args, '-o', escape_shell($orbitdir)) if(defined($orbitdir) && -d $orbitdir);
+ push(@args, '-j', escape_shell($jvmargs)) if($jvmargs ne q{});
+ push(@args, '-a', escape_shell($bopts)) if($bopts ne q{});
+ push(@args, '-d', escape_shell(join(q{ }, @deps))) if(scalar(@deps) > 0);
push(@args, $pdeargs);
- complex_doit("cd", $pdebdir , "&&", $pdebcmd, @args, "-f", $feat);
+ complex_doit('cd', $pdebdir , '&&', $pdebcmd, @args, '-f', $feat);
}
=head1 EXAMPLE
diff --git a/jh_generateorbitdir b/jh_generateorbitdir
index 620a913..c2a705e 100755
--- a/jh_generateorbitdir
+++ b/jh_generateorbitdir
@@ -8,12 +8,14 @@ jh_generateorbitdir - Creates and populates an orbit dir used by pde-build for t
use strict;
use warnings;
+use autodie;
use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
use Debian::Debhelper::Dh_Lib;
-use Debian::Javahelper::Eclipse;
-use Debian::Javahelper::Java;
-use Debian::Javahelper::Manifest( qw(MAIN_SECTION) );
+
+use Debian::Javahelper::Eclipse qw(:constants);
+use Debian::Javahelper::Java qw(parse_manifest_fd);
+use Debian::Javahelper::Manifest qw(MAIN_SECTION);
=head1 SYNOPSIS
@@ -71,14 +73,15 @@ my $orbitdir = undef;
my $cachefile = 'debian/orbitdeps.debhelper';
my $infile = 'debian/eclipse.orbitdeps';
my @orbitdeps;
-my @include = ('.', '/usr/share/java');
+my @include = (q{.}, '/usr/share/java');
my $tmpdir = undef;
+my $orbit_fd;
init(options => {
- "orbit-dir=s" => \$orbitdir,
+ 'orbit-dir=s' => \$orbitdir,
});
-$orbitdir = "debian/.eclipse-build/orbitdeps" unless(defined($orbitdir));
+$orbitdir = 'debian/.eclipse-build/orbitdeps' unless(defined($orbitdir));
@orbitdeps = @ARGV;
@@ -96,7 +99,7 @@ $SIG{'INT'} = \&sighandler;
$SIG{'TERM'} = \&sighandler;
if( ! $dh{NO_ACT}){
- open(ORBIT_CACHE, '>>', $cachefile) or error("$cachefile: $!");
+ open($orbit_fd, '>>', $cachefile);
}
doit('mkdir', '-p', $orbitdir);
@@ -112,7 +115,7 @@ foreach my $jar (find_jars(@orbitdeps)){
my $ltarget = readlink("$orbitdir/${symName}_${version}.jar");
if(defined($ltarget)){
#Use target
- print ORBIT_CACHE "$ltarget, $symName, $version\n"
+ print {$orbit_fd} "$ltarget, $symName, $version\n"
unless($dh{NO_ACT});
} else {
warning('Cannot determine target of ' .
@@ -126,12 +129,12 @@ foreach my $jar (find_jars(@orbitdeps)){
if( -d "$orbitdir/${symName}_${version}.jar");
doit('rm', '-f', "$orbitdir/${symName}_${version}.jar")
if( -e "$orbitdir/${symName}_${version}.jar");
- print ORBIT_CACHE "$jar, $symName, $version\n" unless($dh{NO_ACT});
+ print ${orbit_fd} "$jar, $symName, $version\n" unless($dh{NO_ACT});
doit('ln', '-s', $jar, "$orbitdir/${symName}_${version}.jar");
}
if( ! $dh{NO_ACT}){
- close(ORBIT_CACHE) or error("$cachefile: $!");
+ close($orbit_fd);
}
exit 0;
@@ -145,9 +148,9 @@ sub read_manifest {
$zip->read( "$jar" ) == AZ_OK or error("Could not read $jar: $!");
($con, $stat) = $zip->contents( 'META-INF/MANIFEST.MF' );
error("Could not read manifest from $jar ($stat): $!")
- unless(!defined($stat) or $stat == AZ_OK);
+ unless(!defined($stat) || $stat == AZ_OK);
error("$jar has no manifest") unless(defined($stat));
- open($fd, '<', \$con) or error("open read string: $!");
+ open($fd, '<', \$con);
$manifest = parse_manifest_fd($fd, $jar);
close($fd);
return $manifest;
@@ -160,15 +163,15 @@ sub sighandler {
}
sub find_jars{
- my @inc = ('.', '/usr/share/java');
+ my @inc = (q{.}, '/usr/share/java');
my @res = ();
foreach my $globpattern (@_){
my @i = @inc;
my $found = 0;
# Only use inc-path if there is no path.
- @i = ('') if($globpattern =~ m@/@o);
+ @i = (q{}) if($globpattern =~ m@/@o);
glob_loop: foreach my $p (@inc){
- foreach my $s ('', '.jar') {
+ foreach my $s (q{}, '.jar') {
my @matches;
if($p eq ''){
@matches = glob("$globpattern$s");
@@ -176,7 +179,7 @@ sub find_jars{
@matches = glob("$p/$globpattern$s");
}
# skip if nothing matched or it was not a glob and the file does not exist.
- next if(scalar(@matches) == 0 or ! -e $matches[0]);
+ next if (scalar(@matches) == 0 || ! -e $matches[0]);
push(@res, @matches);
$found = 1;
last glob_loop;
diff --git a/jh_installeclipse b/jh_installeclipse
index ef49370..a74f0ec 100755
--- a/jh_installeclipse
+++ b/jh_installeclipse
@@ -7,8 +7,12 @@ jh_installeclipse - Installs eclipse features built by pde-build into package bu
=cut
use strict;
+use warnings;
+use autodie;
+
use Debian::Debhelper::Dh_Lib;
-use Debian::Javahelper::Eclipse;
+
+use Debian::Javahelper::Eclipse qw(:constants install_zipped_feature);
=head1 SYNOPSIS
@@ -73,8 +77,8 @@ my $orbitcfile = 'debian/orbitdeps.debhelper';
my @orbitdeps = ();
my %needed;
init(options => {
- "pde-build-dir=s" => \$pdebdir,
- "install-name=s" => \$fallback
+ 'pde-build-dir=s' => \$pdebdir,
+ 'install-name=s' => \$fallback
});
# Use default value if none are given.
@@ -85,29 +89,29 @@ $pdebdir = "$pdebdir/build/rpmBuild";
if( -e $orbitcfile) {
# Read the orbit data from jh_generateorbitdir
- open(ORBIT, "<", $orbitcfile) or error("$orbitcfile: $!");
- while( my $line = <ORBIT>){
+ open(my $fd, '<', $orbitcfile);
+ while( my $line = <$fd>){
my ($sysjar, $orbjar);
chomp($line);
($sysjar, $orbjar, undef) = split(/\s*+,\s*+/o, $line);
push(@orbitdeps, {${\EOB_SYM_NAME} => $orbjar, ${\EOB_SYS_JAR} => $sysjar});
}
- close(ORBIT);
+ close($fd);
}
# gather a hash of arch dependent packages; their stuff is installed
# under lib rather than share.
-foreach my $arch (getpackages("arch")){
+foreach my $arch (getpackages('arch')){
$archpackages{$arch} = 1;
}
foreach my $package (@{$dh{DOPACKAGES}}) {
- my $installfile = pkgfile($package, "eh-install");
+ my $installfile = pkgfile($package, 'eh-install');
my $dropins;
my $lineno = 0;
my $defdname = $fallback;
my @infiles;
- next if($installfile eq '');
+ next if($installfile eq q{});
$defdname = $1 if($package =~ m/^eclipse-(.+)/o);
$dropins = get_dropins_path($package);
@infiles = filedoublearray($installfile);
@@ -116,18 +120,21 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
foreach my $line (@infiles) {
my ($zipglob, $dname, $other) = @$line;
- error("Trailing text in $installfile ($other)") if(defined($other) && length($other) > 0);
+ error("Trailing text in $installfile ($other)")
+ if(defined($other) && length($other) > 0);
$dname = $defdname unless(defined($dname) && length($dname) > 0);
- error("Missing (and could not guess) eclipse-name for $zipglob for $package - please provide a default.") unless(defined($dname) && length($dname) > 0);
+ error("Missing (and could not guess) eclipse-name for $zipglob for $package - please provide a default.")
+ unless(defined($dname) && length($dname) > 0);
foreach my $zip (glob("$pdebdir/$zipglob")){
- foreach my $ext (('', '.zip', '.ZIP')){
+ foreach my $ext ((q{}, '.zip', '.ZIP')){
# Guess common extensions - mostly for the "non-globable cases".
if( -e "$zip${ext}"){
$zip = "$zip${ext}";
last;
}
}
- install_zipped_feature($zip, "$dropins/$dname", \@orbitdeps, $package, \%needed);
+ install_zipped_feature($zip, "$dropins/$dname", \@orbitdeps,
+ $package, \%needed);
}
}
}
@@ -139,14 +146,14 @@ while ( my ($sysjar, $users) = each(%needed) ){
}
$ver =~ s/-1$//o;
foreach my $pack (keys(%$users)){
- addsubstvar($pack, "orbit:Depends", $pkg, ">= $ver");
+ addsubstvar($pack, 'orbit:Depends', $pkg, ">= $ver");
}
}
foreach my $package (@{$dh{DOPACKAGES}}){
my $ext=pkgext($package);
my $substvars="debian/${ext}substvars";
- if (! -e $substvars || system("grep -q '^orbit:Depends=' $substvars") != 0) {
+ if (! -e $substvars || system('grep', '-q', '^orbit:Depends=', $substvars) != 0) {
complex_doit("echo orbit:Depends= >> $substvars");
}
}
@@ -156,8 +163,8 @@ exit(0);
# Determines where to install something for a given package.
sub get_dropins_path{
my $package = shift;
- my $prefix = tmpdir($package) . "/usr/";
- $prefix .= exists($archpackages{$package})?"lib":"share";
+ my $prefix = tmpdir($package) . '/usr/';
+ $prefix .= exists($archpackages{$package})?'lib':'share';
return "$prefix/eclipse/dropins";
}
@@ -167,8 +174,8 @@ sub find_dependency{
my $depver = undef;
my %pkgtable;
verbose_print("dpkg -S $sysjar");
- open(DPKG, "dpkg -S $sysjar |") or error("Could not run dpkg -S $sysjar");
- while( my $input = <DPKG> ){
+ open(my $fd, '-|', 'dpkg', '-S', $sysjar);
+ while( my $input = <$fd> ){
my ($p, $f);
chomp($input);
($p, $f) = split(/\s*+:\s*+/o, $input);
@@ -176,12 +183,11 @@ sub find_dependency{
$pkgtable{$p} = 1;
}
}
- close(DPKG);
+ close($fd);
if(scalar(keys(%pkgtable)) > 0){
- my $cmd = "dpkg -l | grep -E ^ii";
- verbose_print($cmd);
- open(DPKG, "$cmd | ") or error("Could not run $cmd");
- while( chomp(my $line = <DPKG>) ){
+ verbose_print('dpkg -l');
+ open(my $dfd, '-|', 'dpkg', '-l');
+ while( chomp(my $line = <$dfd>) ){
my ($pname, $version);
next if($line !~ m/^ii/o);
(undef, $pname, $version, undef) = split(/\s++/o, $line);
@@ -190,7 +196,7 @@ sub find_dependency{
$depver = $version;
}
}
- close(DPKG);
+ close($dfd);
}
return ($deppkg, $depver);
}
diff --git a/jh_manifest b/jh_manifest
index d1418f4..b029d35 100755
--- a/jh_manifest
+++ b/jh_manifest
@@ -8,12 +8,14 @@ jh_manifest - Adds or/and modifies manifests for jars
use strict;
use warnings;
+use autodie;
use Cwd();
use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
use Debian::Debhelper::Dh_Lib;
-use Debian::Javahelper::Java;
-use Debian::Javahelper::Manifest( qw(MAIN_SECTION) );
+
+use Debian::Javahelper::Java qw(parse_manifest_fd write_manifest_fd);
+use Debian::Javahelper::Manifest qw(MAIN_SECTION);
=head1 SYNOPSIS
@@ -97,14 +99,14 @@ my $envcp = 0;
init(options => {
# -o clashes debhelper's "only scripts"
- "javaopts|o=s" => \$jopt,
- "java-home|j=s" => \$jvm,
- "main|m=s" => \$mcl,
- "classpath|c=s" => \$cp,
- "version|V" => sub { print STDERR "Version has been removed - please stop using it\n"; exit(0) },
+ 'javaopts|o=s' => \$jopt,
+ 'java-home|j=s' => \$jvm,
+ 'main|m=s' => \$mcl,
+ 'classpath|c=s' => \$cp,
+ 'version|V' => sub { print STDERR "Version has been removed - please stop using it\n"; exit(0) },
});
-if(!$cp && ($ENV{'CLASSPATH'}//'') ne ''){
+if(!$cp && ($ENV{'CLASSPATH'}//q{}) ne q{}){
$cp = $ENV{'CLASSPATH'};
$cp =~ s/:/ /go;
$envcp = 1;
@@ -124,7 +126,7 @@ if(@ARGV){
# does not accidentally install a system install jar instead.
$target =~ s@^\.?/+@@og;
# Bail unless $dir/$target exists
- error ("$target: $!") unless -f "$dir/$target";
+ error("$target: $!") unless -f "$dir/$target";
$target = "$dir/$target";
}
if ( -l $jar ){
@@ -135,7 +137,8 @@ if(@ARGV){
$link = 1;
}
# no-act implies others tools are in no-act mode as well
- error("Cannot update $jar: it does not exist.") unless -f $jar or !$dh{NO_ACT};
+ error("Cannot update $jar: it does not exist.")
+ unless -f $jar || !$dh{NO_ACT};
if ($link){
verbose_print("Updating symlinked $target (via $orig)");
} else {
@@ -149,13 +152,12 @@ if(@ARGV){
}
foreach my $package (@{$dh{DOPACKAGES}}) {
- my $man = pkgfile($package, "manifest");
+ my $man = pkgfile($package, 'manifest');
my $dir = tmpdir($package);
my $manifests = {};
my $files = {};
my @links = ();
my $find_cmd="find $dir ";
- my $err;
my $fulldir = Cwd::abs_path($dir);
# skip if it does not exist.
if( ! -d $dir ){
@@ -163,12 +165,12 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
next;
}
$manifests = parse_package_file($man) if($man);
- if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne ''){
- $find_cmd.=" '!' \\( $dh{EXCLUDE_FIND} \\) -a ";
+ if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne q{}){
+ $find_cmd.=q{ '!' \\( $dh{EXCLUDE_FIND} \\) -a };
}
- $find_cmd .= " -name '*.jar'";
- verbose_print("$find_cmd");
- open(my $jarfiles, "-|", "$find_cmd") or error("$find_cmd: $!");
+ $find_cmd .= q{ -name '*.jar'};
+ verbose_print($find_cmd);
+ open(my $jarfiles, '-|', $find_cmd);
while( my $jar = <$jarfiles> ) {
chomp($jar);
if( -l $jar ) {
@@ -183,9 +185,6 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
}
close($jarfiles);
- # Shame on me - using internal subs from Dh_Lib - but it works.
- # It will error out if invoked.
- Debian::Debhelper::Dh_Lib::_error_exitcode($find_cmd) if($?);
# check the links first.
foreach my $link (@links) {
my $path = Cwd::abs_path("$dir/$link");
@@ -234,7 +233,7 @@ sub parse_package_file{
my @jars;
my @man;
my $inlen = 0;
- open(my $file, "<", $pkgfile) or error("$pkgfile: $!");
+ open(my $file, '<', $pkgfile);
while( my $line = <$file> ){
chomp($line);
next if($line =~ m/^#/o);
@@ -248,7 +247,7 @@ sub parse_package_file{
if(@man){
my $mlines = join("\n", @man);
my $manifest;
- open(my $mfd, "<", \$mlines) or error("Reading scalar: $!");
+ open(my $mfd, '<', \$mlines);
$manifest = parse_manifest_fd($mfd, $pkgfile);
close($mfd);
foreach my $j (@jars){
@@ -258,7 +257,7 @@ sub parse_package_file{
@man = ();
@jars = ();
}
- next if($line eq '');
+ next if($line eq q{});
if($line =~ m/\.jar:$/o){
$line =~ s@^/*@@o;
$line =~ s@//+@/@og;
@@ -272,7 +271,7 @@ sub parse_package_file{
if(@man){
my $mlines = join("\n", @man);
my $manifest;
- open(my $mfd, "<", \$mlines) or error("Reading scalar: $!");
+ open(my $mfd, '<', \$mlines);
$manifest = parse_manifest_fd($mfd, $pkgfile);
close($mfd);
foreach my $j (@jars){
@@ -296,10 +295,11 @@ sub update_jar{
# stringify or $zip will make a call back that fails.
$zip->read( "$jar" ) == AZ_OK or error("Could not read $jar: $!");
($con, $stat) = $zip->contents( 'META-INF/MANIFEST.MF' );
- die("Could not read manifest from $jar ($stat): $!") unless(!defined($stat) or $stat == AZ_OK);
+ die("Could not read manifest from $jar ($stat): $!")
+ unless(!defined($stat) || $stat == AZ_OK);
if(defined($stat)) {
verbose_print("Reading manifest from $jar");
- open(my $fd, "<", \$con) or error("open read string: $!");
+ open(my $fd, '<', \$con);
$manifest = parse_manifest_fd($fd, $jar);
close($fd);
} else {
@@ -312,7 +312,7 @@ sub update_jar{
$dirty = 1;
}
$main = $manifest->get_section(MAIN_SECTION, 1);
- if($cp && (!$envcp || ($main->get_value('Class-Path')//'') eq '')){
+ if($cp && (!$envcp || ($main->get_value('Class-Path')//q{}) eq q{})){
$main->set_value('Class-Path', $cp);
$dirty = 1;
}
@@ -331,7 +331,7 @@ sub update_jar{
if($dirty){
my $var;
my $mem;
- open(my $fd, ">", \$var) or error("open write string: $!");
+ open(my $fd, '>', \$var);
write_manifest_fd($manifest, $fd, $jar);
close($fd);
verbose_print("Updating manifest in $jar");
diff --git a/jh_scanjavadoc b/jh_scanjavadoc
index 28a9286..3d018d6 100755
--- a/jh_scanjavadoc
+++ b/jh_scanjavadoc
@@ -6,7 +6,9 @@
use strict;
use warnings;
-use Debian::Javahelper::Java;
+use autodie;
+
+use Debian::Javahelper::Java qw(find_package_for_existing_files scan_javadoc);
my @dep = ();
@@ -16,4 +18,4 @@ foreach my $doclink ( map { scan_javadoc($_) } @ARGV){
push(@dep, $doclink);
}
-print join(", ", find_package_for_existing_files(@dep)), "\n" if(@dep);
+print join(', ', find_package_for_existing_files(@dep)), "\n" if(@dep);
diff --git a/jh_setupenvironment b/jh_setupenvironment
index ceba3d8..b8376ff 100755
--- a/jh_setupenvironment
+++ b/jh_setupenvironment
@@ -7,6 +7,9 @@ jh_setupenvironment - Prepares a build environment to compile an eclipse feature
=cut
use strict;
+use warnings;
+use autodie;
+
use Debian::Debhelper::Dh_Lib;
=head1 SYNOPSIS
@@ -58,29 +61,29 @@ my $me = basename($0);
my $clean = '';
init(options => {
- "pde-build-dir=s" => \$builddir,
- "clean" => sub { $clean = 1 },
+ 'pde-build-dir=s' => \$builddir,
+ 'clean' => sub { $clean = 1 },
});
-$clean = 0 unless(defined($clean) and $clean ne '');
+$clean = 0 unless(defined($clean) and $clean ne q{});
$builddir = 'debian/.eclipse-build' unless(defined($builddir));
# do not write to the log if we are cleaning.
inhibit_log() if($clean);
if($clean){
- doit("rm", "-fr", $builddir);
+ doit('rm', '-fr', $builddir);
# clean up after jh_generateorbitdeps - dh_clean tend to miss this file
# because it does not "belong" to a package.
- doit("rm", "-f", "orbitdeps.debhelper");
+ doit('rm', '-f', 'debian/orbitdeps.debhelper');
} else{
- my $bfile = "debian/eclipse.environment";
+ my $bfile = 'debian/eclipse.environment';
if( -f $bfile){
- push(@ARGV, filearray($bfile));
+ push(@ARGV, filearray($bfile));
}
- push(@ARGV, "org.eclipse.*") unless(scalar(@ARGV) > 0);
- doit("mkdir", "-p", $builddir);
- complex_doit("cp -far " . join(" ", @ARGV) . " $builddir");
+ push(@ARGV, 'org.eclipse.*') unless(scalar(@ARGV) > 0);
+ doit('mkdir', '-p', $builddir);
+ complex_doit('cp -far ' . join(' ', @ARGV) . " $builddir");
}
exit(0);
diff --git a/lib/Debian/Javahelper/Eclipse.pm b/lib/Debian/Javahelper/Eclipse.pm
index 2f71378..b596b12 100644
--- a/lib/Debian/Javahelper/Eclipse.pm
+++ b/lib/Debian/Javahelper/Eclipse.pm
@@ -13,7 +13,10 @@ use autodie;
use Exporter qw(import);
use Debian::Debhelper::Dh_Lib qw(doit error);
-our @EXPORT = qw(EOB_SYM_NAME EOB_BUNDLE_VERSION EOB_SYS_JAR &install_zipped_feature);
+our %EXPORT_TAGS = (
+ 'constants' => [qw(EOB_SYM_NAME EOB_BUNDLE_VERSION EOB_SYS_JAR)],
+);
+our @EXPORT_OK = (@{ $EXPORT_TAGS{'constants'} }, qw(install_zipped_feature));
=head1 SYNOPSIS
diff --git a/lib/Debian/Javahelper/Java.pm b/lib/Debian/Javahelper/Java.pm
index cab2506..ca5bb3f 100644
--- a/lib/Debian/Javahelper/Java.pm
+++ b/lib/Debian/Javahelper/Java.pm
@@ -16,7 +16,11 @@ use File::Spec;
use Debian::Javahelper::Manifest();
-our @EXPORT = qw(&scan_javadoc &find_package_for_existing_files &write_manifest_fd &parse_manifest_fd);
+our @EXPORT_OK = qw(scan_javadoc
+ find_package_for_existing_files
+ write_manifest_fd
+ parse_manifest_fd
+);
=head1 SYNOPSIS
diff --git a/lib/Debian/Javahelper/Manifest.pm b/lib/Debian/Javahelper/Manifest.pm
index 15fa2c9..0586cab 100644
--- a/lib/Debian/Javahelper/Manifest.pm
+++ b/lib/Debian/Javahelper/Manifest.pm
@@ -12,10 +12,10 @@ use autodie;
use Exporter qw(import);
-use Debian::Javahelper::ManifestSection;
+use Debian::Javahelper::ManifestSection qw(MAIN_SECTION);
# pass it on to others.
-our @EXPORT = qw(MAIN_SECTION);
+our @EXPORT_OK = qw(MAIN_SECTION);
=head1 SYNOPSIS
diff --git a/lib/Debian/Javahelper/ManifestSection.pm b/lib/Debian/Javahelper/ManifestSection.pm
index 3ed0fad..4e74aeb 100644
--- a/lib/Debian/Javahelper/ManifestSection.pm
+++ b/lib/Debian/Javahelper/ManifestSection.pm
@@ -12,7 +12,7 @@ use warnings;
use autodie;
use Exporter qw(import);
-our @EXPORT = qw(MAIN_SECTION);
+our @EXPORT_OK = qw(MAIN_SECTION);
use constant {
MAIN_SECTION => 'MAIN'
--
UNNAMED PROJECT
More information about the pkg-java-commits
mailing list