X-Git-Url: http://git.shiar.nl/perl/plp/.git/blobdiff_plain/0f5e78a789961923b45cae1a881c655fff9e7283..6fb22c399428a8e7cac088cab5603e75a87016fa:/PLP/Functions.pm diff --git a/PLP/Functions.pm b/PLP/Functions.pm index 9d7b33c..99aa27b 100644 --- a/PLP/Functions.pm +++ b/PLP/Functions.pm @@ -8,10 +8,13 @@ our @EXPORT = qw/HiddenFields Entity DecodeURI EncodeURI Entity include AddCookie ReadFile WriteFile AutoURL Counter Include/; sub Include ($) { - my ($file) = $_[0]; + no strict; + $PLP::file = $_[0]; $PLP::inA = 0; $PLP::inB = 0; - eval PLP::source($file, 0); + local $@; + eval 'package PLP::Script; ' . PLP::source($PLP::file, 0, join ' ', (caller)[2,1]); + PLP::error($@, 1) if $@; } sub include ($) {