Subject: | Global symbol "$global" requires explicit package name |
I'm not sure which version of Perl you are running (perhaps you need to specify a minimum version), but with v5.8.7 I get an error when '//' is used as a binary operator on line 64 (see attached file). Did you mean to use '||'?
--- lib/Template/Plugin/Subst.pm 2005-11-11 10:47:35.000000000 +1100
+++ tmp1 2005-11-11 10:49:15.000000000 +1100
@@ -61,7 +61,7 @@
my $pattern = $config->{'pattern'};
my $replacement = $config->{'replacement'};
- my $global = $config->{'global'} // 1;
+ my $global = $config->{'global'} || 1;
# warn "pattern: $pattern, replacement: $replacement\n";
$text = subst($text, $pattern, $replacement, $global);
@@ -72,7 +72,7 @@
sub subst {
my($text, $pattern, $replacement, $global) = @_;
- $global = $global // 1;
+ $global = $global || 1;
# warn "-> subst() ('$pattern', '$replacement')\n";
if($text !~ m/$pattern/) {