use strict;
use warnings;
-use Carp qw/croak/;
-use Config qw/%Config/;
-use Cwd qw/cwd/;
+use Carp qw<croak>;
+use Config qw<%Config>;
+use Cwd qw<cwd>;
use App::Rgit;
-use App::Rgit::Utils qw/:levels/;
+use App::Rgit::Utils qw<:levels>;
use App::Rgit::Policy;
our $VERSION;
=cut
BEGIN {
- eval "sub $_ { \$_[0]->{$_} }" for qw/config command/;
+ eval "sub $_ { \$_[0]->{$_} }" for qw<config command>;
}
=head1 SEE ALSO
use Carp ();
-use App::Rgit::Utils qw/:codes/;
+use App::Rgit::Utils qw<:codes>;
=head1 NAME
=cut
my %commands;
-__PACKAGE__->action($_ => 'Once') for qw/daemon gui help init version/, ' ';
+__PACKAGE__->action($_ => 'Once') for qw<daemon gui help init version>, ' ';
sub new {
my $class = shift;
=cut
BEGIN {
- eval "sub $_ { \$_[0]->{$_} }" for qw/cmd args policy/;
+ eval "sub $_ { \$_[0]->{$_} }" for qw<cmd args policy>;
}
=head2 C<run>
use strict;
use warnings;
-use base qw/App::Rgit::Command/;
+use base qw<App::Rgit::Command>;
use App::Rgit::Guard;
-use App::Rgit::Utils qw/:codes/;
+use App::Rgit::Utils qw<:codes>;
=head1 NAME
use strict;
use warnings;
-use base qw/App::Rgit::Command/;
+use base qw<App::Rgit::Command>;
=head1 NAME
use File::Spec (); # canonpath, catfile, path
use App::Rgit::Repository;
-use App::Rgit::Utils qw/:levels/; # :levels, abs_path
+use App::Rgit::Utils qw<:levels>; # :levels, abs_path
use constant IS_WIN32 => $^O eq 'MSWin32';
if (IS_WIN32) {
my @acc;
for my $c (@candidates) {
- push @acc, $c, map "$c.$_", qw/exe com bat cmd/;
+ push @acc, $c, map "$c.$_", qw<exe com bat cmd>;
}
@candidates = @acc;
}
=cut
BEGIN {
- eval "sub $_ { \$_[0]->{$_} }" for qw/root git cwd_repo debug/;
+ eval "sub $_ { \$_[0]->{$_} }" for qw<root git cwd_repo debug>;
}
=head1 SEE ALSO
use strict;
use warnings;
-use File::Find qw/find/;
+use File::Find qw<find>;
-use base qw/App::Rgit::Config/;
+use base qw<App::Rgit::Config>;
use App::Rgit::Repository;
use strict;
use warnings;
-use App::Rgit::Utils qw/:codes/;
+use App::Rgit::Utils qw<:codes>;
-use base qw/App::Rgit::Policy/;
+use base qw<App::Rgit::Policy>;
=head1 NAME
use Cwd ();
-use App::Rgit::Utils qw/:codes/;
+use App::Rgit::Utils qw<:codes>;
-use base qw/App::Rgit::Policy/;
+use base qw<App::Rgit::Policy>;
=head1 NAME
use strict;
use warnings;
-use App::Rgit::Utils qw/:codes/;
+use App::Rgit::Utils qw<:codes>;
-use base qw/App::Rgit::Policy/;
+use base qw<App::Rgit::Policy>;
=head1 NAME
=cut
BEGIN {
- eval "sub $_ { \$_[0]->{$_} }" for qw/fake repo bare name work/;
+ eval "sub $_ { \$_[0]->{$_} }" for qw<fake repo bare name work>;
}
=head1 SEE ALSO
=cut
-use base qw/Exporter/;
+use base qw<Exporter>;
our @EXPORT = ();
our %EXPORT_TAGS = (
- funcs => [ qw/abs_path/ ],
- codes => [ qw/SAVE NEXT REDO LAST/ ],
- levels => [ qw/INFO WARN ERR CRIT/ ],
+ funcs => [ qw<abs_path> ],
+ codes => [ qw<SAVE NEXT REDO LAST> ],
+ levels => [ qw<INFO WARN ERR CRIT> ],
);
our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
$EXPORT_TAGS{'all'} = [ @EXPORT_OK ];
use Test::More tests => 4;
use App::Rgit::Config;
-use App::Rgit::Utils qw/:levels/;
+use App::Rgit::Utils qw<:levels>;
local $SIG{__WARN__} = sub { diag 'warning:', @_ };
local $SIG{__DIE__} = sub { diag 'exception:', @_ };
my $buf = '';
close STDERR;
open STDERR, '>', \$buf or die "open(STDERR, '>', \\\$buf): $!";
- $arc->$_($_) for qw/info warn err crit/;
+ $arc->$_($_) for qw<info warn err crit>;
is $buf, join('', @levels[$l .. $#levels]), "level $l ok";
}
use strict;
use warnings;
-use Cwd qw/cwd abs_path/;
+use Cwd qw<cwd abs_path>;
use File::Spec (); # catdir, catfile
-use File::Temp qw/tempfile tempdir/;
+use File::Temp qw<tempfile tempdir>;
use Test::More;
-use App::Rgit::Utils qw/:codes/;
+use App::Rgit::Utils qw<:codes>;
use App::Rgit;
use lib 't/lib';
-use App::Rgit::TestUtils qw/can_run_git/;
+use App::Rgit::TestUtils qw<can_run_git>;
use App::Rgit::Policy::Callback;
my ($can_run, $reason) = can_run_git;
git => 't/bin/git',
root => $tmpdir,
cmd => $cmd,
- args => [ abs_path($filename), $cmd, qw/%n %g %w %b %G %W %B %R %%n %x/ ],
+ args => [ abs_path($filename), $cmd, qw<%n %g %w %b %G %W %B %R %%n %x> ],
policy => $policy,
);
isa_ok $ar, 'App::Rgit', "each $cmd is an App::Rgit object";
use strict;
use warnings;
-use Cwd qw/abs_path/;
-use File::Temp qw/tempfile/;
+use Cwd qw<abs_path>;
+use File::Temp qw<tempfile>;
use Test::More;
use App::Rgit;
use lib 't/lib';
-use App::Rgit::TestUtils qw/can_run_git/;
+use App::Rgit::TestUtils qw<can_run_git>;
my ($can_run, $reason) = can_run_git;
if ($can_run) {
}
my @expected = (
- ([ [ qw/%n %g %w %b %%/ ] ]) x 5
+ ([ [ qw<%n %g %w %b %%> ] ]) x 5
);
local $ENV{GIT_DIR} = 't';
local $ENV{GIT_EXEC_PATH} = 't/bin/git';
-for my $cmd (qw/daemon gui help init version/) {
+for my $cmd (qw<daemon gui help init version>) {
my ($fh, $filename) = tempfile(UNLINK => 1);
my $ar = App::Rgit->new(
git => $ENV{GIT_EXEC_PATH},
root => $ENV{GIT_DIR},
cmd => $cmd,
- args => [ abs_path($filename), $cmd, qw/%n %g %w %b %%/ ],
+ args => [ abs_path($filename), $cmd, qw<%n %g %w %b %%> ],
);
isa_ok $ar, 'App::Rgit', "once $cmd is an App::Rgit object";
is @lines, 1, "once $cmd visited only one repo";
my $r = [ split /\|/, defined $lines[0] ? $lines[0] : '' ];
- my $e = [ $cmd, qw/%n %g %w %b %%/ ];
+ my $e = [ $cmd, qw<%n %g %w %b %%> ];
s/[\r\n]*$// for @$r;
for (0 .. 5) {
is $r->[$_], $e->[$_], "once $cmd argument $_ is ok";
use strict;
use warnings;
-use base qw/App::Rgit::Policy/;
+use base qw<App::Rgit::Policy>;
sub new {
my $class = shift;
}
BEGIN {
- eval "sub $_ { \$_[0]->{$_} }" for qw/callback/;
+ eval "sub $_ { \$_[0]->{$_} }" for qw<callback>;
}
sub handle {
use strict;
use warnings;
-use Cwd qw/abs_path/;
-use File::Temp qw/tempfile/;
+use Cwd qw<abs_path>;
+use File::Temp qw<tempfile>;
use File::Spec (); # curdir, catfile
-use POSIX qw/WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG/;
+use POSIX qw<WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG>;
BEGIN {
no warnings 'redefine';
*WTERMSIG = sub { shift() & 127 } unless eval { WTERMSIG(0); 1 };
}
-use base qw/Exporter/;
+use base qw<Exporter>;
-our @EXPORT_OK = (qw/can_run_git/);
+our @EXPORT_OK = (qw<can_run_git>);
sub can_run_git {
my ($fh, $filename) = tempfile(UNLINK => 1);
'version',
);
- my $git = File::Spec->catfile(File::Spec->curdir, qw/t bin git/);
+ my $git = File::Spec->catfile(File::Spec->curdir, qw<t bin git>);
if ($^O eq 'MSWin32') {
unless (-x $git) {
$git .= '.bat';