X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole%2FCLI.pm;h=8f8a50eb4cd0243a71ff514a644a04e652c0a9a6;hb=32ecafee815b0fd8043c0acc2c785f5748fc20ff;hp=3839521e2d8112e03bb8eb9971551a28f691843c;hpb=8617321ebf13ce6b63d41a65a003d153f2b5cc5e;p=maypole.git diff --git a/lib/Maypole/CLI.pm b/lib/Maypole/CLI.pm index 3839521..8f8a50e 100644 --- a/lib/Maypole/CLI.pm +++ b/lib/Maypole/CLI.pm @@ -26,6 +26,13 @@ sub import { sub get_template_root { $ENV{MAYPOLE_TEMPLATES} || "." } +sub warn { + my ($self,@args) = @_; + my ($package, $line) = (caller)[0,2]; + warn "[$package line $line] ", @args ; + return; +} + sub parse_location { my $self = shift; my $url = URI->new( shift @ARGV ); @@ -47,7 +54,7 @@ sub send_output { $buffer = shift->{output} } sub call_url { my $self = shift; - @ARGV = @_; + local @ARGV = @_; $package->handler() == OK and return $buffer; }