From 4df4340de7751a6da96eeddfdf9a2e40d246e38d Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 6 Mar 2023 08:01:04 +0100 Subject: [PATCH] drop Git::Repository::Plugin::AUTOLOAD prereq Using it saves a total of 18 characters in the code, but loses most of that by loading the module. And then it needs an extra prereq that isn't handled by the regular prereq scanning mechanisms. --- cpanfile | 1 - dist.ini | 3 --- t/clone.t | 8 ++++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/cpanfile b/cpanfile index 1400d04..af21975 100644 --- a/cpanfile +++ b/cpanfile @@ -18,7 +18,6 @@ requires "File::Temp" => "0"; requires "File::chdir" => "0"; requires "File::chmod" => "0"; requires "Git::Repository" => "0"; -requires "Git::Repository::Plugin::AUTOLOAD" => "0"; requires "HTTP::Tiny" => "0"; requires "LWP::UserAgent" => "0"; requires "List::Pairwise" => "0"; diff --git a/dist.ini b/dist.ini index 8d5f949..1a7a5ca 100644 --- a/dist.ini +++ b/dist.ini @@ -8,6 +8,3 @@ copyright_holder = Yanick Champoux [Encoding / bytes ] encoding = latin-1 match = .*.tar.gz - -[Prereqs] -Git::Repository::Plugin::AUTOLOAD=0 diff --git a/t/clone.t b/t/clone.t index 714da80..bf545cf 100644 --- a/t/clone.t +++ b/t/clone.t @@ -5,7 +5,7 @@ use Test2::V1 -Pip; use Git::CPAN::Patch::Command::Clone; use File::Temp qw/ tempdir /; -use Git::Repository 'AUTOLOAD'; +use Git::Repository; use Test::MockObject; my $data = { @@ -71,12 +71,12 @@ sub test_clone { $command->run; - like $git->branch( '-a', '--no-color' ) => qr#remotes/cpan/master#, + like $git->run('branch', '-a', '--no-color') => qr#remotes/cpan/master#, "branch is there"; - like $git->tag => qr[v0.4.], "tag is there"; + like $git->run('tag') => qr[v0.4.], "tag is there"; - my $log = join "\n", $git->log( 'cpan/master' ); + my $log = join "\n", $git->run('log', 'cpan/master' ); like $log => qr/Author:\s+Yanick\s+Champoux\s+/, 'author';