From: Graham Knop Date: Sat, 12 Oct 2013 08:02:18 +0000 (-0400) Subject: allow --deactivate= format for args X-Git-Tag: v2.000_000~46 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2Flocal-lib.git;a=commitdiff_plain;h=939821afb2cff6b59533d238537d011ef0e58f07 allow --deactivate= format for args --- diff --git a/lib/local/lib.pm b/lib/local/lib.pm index 8718f78..f735680 100644 --- a/lib/local/lib.pm +++ b/lib/local/lib.pm @@ -33,8 +33,8 @@ DEATH elsif ($arg eq '--self-contained') { die "FATAL: The local::lib --self-contained flag has never worked reliably and the original author, Mark Stosberg, was unable or unwilling to maintain it. As such, this flag has been removed from the local::lib codebase in order to prevent misunderstandings and potentially broken builds. The local::lib authors recommend that you look at the lib::core::only module shipped with this distribution in order to create a more robust environment that is equivalent to what --self-contained provided (although quite possibly not what you originally thought it provided due to the poor quality of the documentation, for which we apologise).\n"; } - elsif( $arg eq '--deactivate' ) { - my $path = shift @args; + elsif( $arg =~ /^--deactivate(?:=(.*))?$/ ) { + my $path = defined $1 ? $1 : shift @args; push @steps, ['deactivate', $path]; } elsif ( $arg eq '--deactivate-all' ) {