]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/CLI.pm
new warn function, other small trivial changes and fixes
[maypole.git] / lib / Maypole / CLI.pm
index 3839521e2d8112e03bb8eb9971551a28f691843c..8f8a50eb4cd0243a71ff514a644a04e652c0a9a6 100644 (file)
@@ -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;
 }