diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-10 20:55:31 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-10 20:56:26 -0700 |
commit | b8dbaa0149d7f300a608bb1ee92178b29589617a (patch) | |
tree | 154391377a932bec95e8ed8e2340e2b4dc683ce6 /lib/Git/Annex.pm | |
parent | d5003c566d49b2c43726dc0575dd934476e5f9a4 (diff) | |
download | p5-Git-Annex-b8dbaa0149d7f300a608bb1ee92178b29589617a.tar.gz |
put Git::Annex::Wrapper in its own file
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'lib/Git/Annex.pm')
-rw-r--r-- | lib/Git/Annex.pm | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/Git/Annex.pm b/lib/Git/Annex.pm index 9449a7d..209c55f 100644 --- a/lib/Git/Annex.pm +++ b/lib/Git/Annex.pm @@ -55,6 +55,7 @@ use warnings; use Cwd; use File::chdir; use Git::Wrapper; +use Git::Annex::Wrapper; use Git::Repository; use Try::Tiny; use File::Spec::Functions qw(catfile rel2abs); @@ -279,16 +280,6 @@ sub _git_path { rel2abs $path, $self->toplevel; } -package Git::Annex::Wrapper { - AUTOLOAD { - my $self = shift; - (my $subcommand = our $AUTOLOAD) =~ s/.+:://; - return if $subcommand eq "DESTROY"; - $subcommand =~ tr/_/-/; - $$self->git->RUN("annex", $subcommand, @_); - } -} - =attr annex Gives access to git-annex subcommands in the same way that |