use warnings;
use Cwd ();
-use List::Util qw/reduce/;
+use List::Util qw<reduce>;
use File::Copy ();
use File::Path ();
use File::Spec;
use CPANPLUS::Error ();
-use base qw/CPANPLUS::Dist::Base/;
+use base qw<CPANPLUS::Dist::Base>;
use CPANPLUS::Dist::Gentoo::Atom;
use CPANPLUS::Dist::Gentoo::Guard;
sub format_available {
return $format_available if defined $format_available;
- for my $prog (qw/emerge ebuild/) {
+ for my $prog (qw<emerge ebuild>) {
unless (IPC::Cmd::can_run($prog)) {
__PACKAGE__->_abort("$prog is required to write ebuilds");
return $format_available = 0;
if (IPC::Cmd->can_capture_buffer) {
my $buffers;
my ($success, $errmsg) = IPC::Cmd::run(
- command => [ qw/emerge --info/ ],
+ command => [ qw<emerge --info> ],
verbose => 0,
buffer => \$buffers,
);
my $stat = $self->status;
my $conf = $self->parent->parent->configure_object;
- $stat->mk_accessors(qw/name version author distribution desc uri src license
- meta min_perl
- fetched_arch
- requires configure_requires recursive_requires
- ebuild_name ebuild_version ebuild_dir ebuild_file
- portdir_overlay
- overlay distdir keywords do_manifest header footer
- force verbose/);
+ $stat->mk_accessors(qw<
+ name version author distribution desc uri src license
+ meta min_perl
+ fetched_arch
+ requires configure_requires recursive_requires
+ ebuild_name ebuild_version ebuild_dir ebuild_file
+ portdir_overlay overlay distdir keywords do_manifest header footer
+ force verbose
+ >);
$stat->force($conf->get_conf('force'));
$stat->verbose($conf->get_conf('verbose'));
my $extract_dir = $mod->status->extract;
- for my $name (qw/META.json META.yml/) {
+ for my $name (qw<META.json META.yml>) {
my $meta_file = File::Spec->catdir($extract_dir, $name);
next unless -e $meta_file;
my @portdirs = ($main_portdir, @{$self->status->portdir_overlay});
- for my $category (qw/virtual perl-core dev-perl perl-gcpan/, CATEGORY) {
+ for my $category (qw<virtual perl-core dev-perl perl-gcpan>, CATEGORY) {
my $name = ($category eq 'virtual' ? 'perl-' : '') . $name;
for my $portdir (@portdirs) {
my ($range, $category, $name, $version);
if (defined $args{name}) {
- ($range, $category, $name, $version) = @args{qw/range category name version/};
+ ($range, $category, $name, $version) = @args{qw<range category name version>};
Carp::confess('Category unspecified') unless defined $category;
Carp::confess('Invalid category') unless $category =~ /^$category_rx$/o;
Carp::confess('Invalid name') unless $name =~ /^$name_rx$/o;
}
BEGIN {
- eval "sub $_ { \$_[0]->{$_} }" for qw/category name version range ebuild/;
+ eval "sub $_ { \$_[0]->{$_} }" for qw<category name version range ebuild>;
}
=head2 C<category>
my %version_mismatch;
-$version_mismatch{$_} = $insert_dot_at_1 for qw/
+$version_mismatch{$_} = $insert_dot_at_1 for qw<
CGI-Simple
-/;
+>;
-$version_mismatch{$_} = $insert_dot_at_all_1 for qw/
+$version_mismatch{$_} = $insert_dot_at_all_1 for qw<
AnyEvent
Archive-Rar
IO-AIO
Tie-Array-Sorted
Tk-TableMatrix
XML-RSS-Feed
-/;
+>;
-$version_mismatch{$_} = $insert_dot_at_2 for qw/
+$version_mismatch{$_} = $insert_dot_at_2 for qw<
Error
-/;
+>;
-$version_mismatch{$_} = $insert_dot_at_all_2 for qw/
+$version_mismatch{$_} = $insert_dot_at_all_2 for qw<
Authen-Htpasswd
BSD-Resource
CDDB
Time-HiRes
Time-Local
perl-ldap
-/;
+>;
-$version_mismatch{$_} = $insert_dot_at_all_3 for qw/
+$version_mismatch{$_} = $insert_dot_at_all_3 for qw<
Parse-RecDescent
Return-Value
-/;
+>;
-$version_mismatch{$_} = $pad_decimals_to_2 for qw/
+$version_mismatch{$_} = $pad_decimals_to_2 for qw<
Nmap-Parser
XML-AutoWriter
-/;
+>;
-$version_mismatch{$_} = $pad_decimals_to_4 for qw/
+$version_mismatch{$_} = $pad_decimals_to_4 for qw<
Convert-BER
-/;
+>;
-$version_mismatch{$_} = $correct_suffixes for qw/
+$version_mismatch{$_} = $correct_suffixes for qw<
Gimp
XML-Grove
-/;
+>;
-$version_mismatch{$_} = $strip_letters for qw/
+$version_mismatch{$_} = $strip_letters for qw<
DelimMatch
SGMLSpm
-/;
+>;
-$version_mismatch{$_} = $letters_as_suffix for qw/
+$version_mismatch{$_} = $letters_as_suffix for qw<
Frontier-RPC
-/;
+>;
sub version_c2g {
my ($n, $v) = @_;
my $letter_rx = qr/[a-zA-Z]/;
my $dotted_num_rx = qr/$int_rx(?:\.$int_rx)*/o;
-my @suffixes = qw(alpha beta pre rc normal p);
+my @suffixes = qw<alpha beta pre rc normal p>;
my $suffix_rx = join '|', grep !/^normal$/, @suffixes;
$suffix_rx = qr/(?:$suffix_rx)/o;
my @parts;
BEGIN {
- @parts = qw/version letter suffixes revision/;
+ @parts = qw<version letter suffixes revision>;
eval "sub $_ { \$_[0]->{$_} }" for @parts;
}
use Fatal;
use File::Spec;
-use File::Copy qw/copy/;
-use List::Util qw/max reduce/;
+use File::Copy qw<copy>;
+use List::Util qw<max reduce>;
use Storable ();
use Term::ANSIColor;
use CPAN::DistnameInfo 0.11;
-use Capture::Tiny qw/capture/;
+use Capture::Tiny qw<capture>;
use LWP::UserAgent;
use Parse::CPAN::Packages::Fast;
sub parse_portage_tree {
my $pcp = Parse::CPAN::Packages::Fast->new(PACKAGES);
- for my $category (qw/perl-core dev-perl/) {
+ for my $category (qw<perl-core dev-perl>) {
p(0, "Browsing the $category category.\n");
my $cat_dir = File::Spec->catdir(PORTAGE, $category);
map [ $_, CPANPLUS::Dist::Gentoo::Atom->new_from_ebuild($_) ],
glob File::Spec->catfile($pkg_dir, "$pkg_name-*");
my ($ebuild, $atom) = @$last;
- p(1, "%s/%s-%s\n", map $atom->$_, qw/category name version/);
+ p(1, "%s/%s-%s\n", map $atom->$_, qw<category name version>);
if (exists $is_on_cpan{$pkg_name} and not $is_on_cpan{$pkg_name}) {
p(2, colored("$pkg_name is not a CPAN distribution (forced)", 'bright_red')
is vc2g('1_.1_.2'), '1_p12', "version_c2g('1_.1_.2')";
for my $test ([ '0.12' => '0.12' ], [ '0.1234' => '0.12.34' ]) {
- my @dists = qw/
+ my @dists = qw<
ExtUtils-CBuilder
ExtUtils-ParseXS
Module-Build
Time-HiRes
Time-Local
- /;
+ >;
for my $dist (@dists) {
is vc2g($dist, $test->[0]), $test->[1], "'version_c2g('$dist', '$test->[0]')";
}
check_licenses [ ], [ ], 'empty';
check_licenses [ undef ], [ ], 'undef';
check_licenses [ 'woo' ], [ ], 'nonexistent';
-check_licenses [ 'perl' ], [ qw/Artistic GPL-2/ ], 'perl';
-check_licenses [ qw/perl gpl2/ ], [ qw/Artistic GPL-2/ ], 'perl + gpl2';
-check_licenses [ qw/perl bsd/ ], [ qw/Artistic GPL-2 BSD/ ], 'perl + bsd';
+check_licenses [ 'perl' ], [ qw<Artistic GPL-2> ], 'perl';
+check_licenses [ qw<perl gpl2> ], [ qw<Artistic GPL-2> ], 'perl + gpl2';
+check_licenses [ qw<perl bsd> ], [ qw<Artistic GPL-2 BSD> ], 'perl + bsd';
[ { ebuild => '/wat/test+/a+b/a+b-1.2.3.ebuild' } => { %$a2, range => '>=' } ],
);
-my @fields = qw/range category name version ebuild/;
+my @fields = qw<range category name version ebuild>;
for my $t (@tests) {
my ($args, $exp) = @$t;
eval "use Pod::Coverage $min_pc";
plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage" if $@;
-all_pod_coverage_ok( { also_private => [ qw/format_available init prepare create install uninstall/ ] });
+all_pod_coverage_ok({
+ also_private => [ qw<format_available init prepare create install uninstall> ],
+});