'Exporter' => 0,
'File::Find' => 0,
'File::Spec::Functions' => 0,
- 'Object::Tiny' => 0,
'POSIX' => 0,
'base' => 0,
);
The core modules L<Carp>, L<Config>, L<Cwd>, L<Exporter>, L<File::Find>, L<File::Spec::Functions> and L<POSIX>.
-L<Object::Tiny>.
-
=head1 AUTHOR
Vincent Pit, C<< <perl at profvince.com> >>, L<http://profvince.com>.
use strict;
use warnings;
-use Object::Tiny qw/config command/;
-
use App::Rgit::Command;
use App::Rgit::Config;
use App::Rgit::Utils qw/validate/;
policy => $args{policy},
);
return unless defined $command;
- $class->SUPER::new(
+ bless {
config => $config,
command => $command,
- );
+ }, $class;
}
=head2 C<run>
=head2 C<command>
-Accessors.
+Read-only accessors.
+
+=cut
+
+BEGIN {
+ eval "sub $_ { \$_[0]->{$_} }" for qw/config command/;
+}
=head1 SEE ALSO
use Carp qw/croak/;
-use Object::Tiny qw/cmd args policy/;
-
use App::Rgit::Utils qw/validate :codes/;
=head1 NAME
unless $class->isa($action);
}
eval "require $action; 1" or croak "Couldn't load $action: $@";
- $class->SUPER::new(
+ bless {
cmd => $cmd,
args => $args{args} || [ ],
policy => $args{policy},
- );
+ }, $class;
}
=head2 C<< action $cmd [ => $pkg ] >>
=head2 C<policy>
-Accessors.
+Read-only accessors.
+
+=cut
+
+BEGIN {
+ eval "sub $_ { \$_[0]->{$_} }" for qw/cmd args policy/;
+}
=head2 C<run $conf>
use Cwd qw/abs_path/;
use File::Spec::Functions qw/file_name_is_absolute/;
-use Object::Tiny qw/root git cwd_repo debug/;
-
use App::Rgit::Repository;
use App::Rgit::Utils qw/validate :levels/;
my $r = App::Rgit::Repository->new(fake => 1);
return unless defined $r;
- $conf->SUPER::new(
+ bless {
root => $root,
git => $git,
cwd_repo => $r,
debug => defined $args{debug} ? int $args{debug} : WARN,
- );
+ }, $conf;
}
=head2 C<info $msg>
=head2 C<debug>
-Accessors.
+Read-only accessors.
+
+=cut
+
+BEGIN {
+ eval "sub $_ { \$_[0]->{$_} }" for qw/root git cwd_repo debug/;
+}
=head1 SEE ALSO
*WIFSIGNALED = sub { shift() & 127 } unless eval { WIFSIGNALED(0); 1 };
}
-use Object::Tiny qw/fake repo bare name work/;
-
use App::Rgit::Utils qw/validate/;
=head1 NAME
$work = $repo;
}
}
- $class->SUPER::new(
+ bless {
fake => !!$args{fake},
repo => $repo,
bare => $bare,
name => $name,
work => $work,
- );
+ }, $class;
}
=head2 C<chdir>
=head2 C<work>
-Accessors.
+Read-only accessors.
+
+=cut
+
+BEGIN {
+ eval "sub $_ { \$_[0]->{$_} }" for qw/fake repo bare name work/;
+}
=head1 SEE ALSO