[Zope-Perl] Next question
Gisle Aas
gisle@ActiveState.com
03 Aug 2000 14:54:57 +0200
Monty Taylor <mtaylor@goldridge.net> writes:
> Wait. A-ha! If I add a blank line at the end, it works. Here's a patch
> to PerlMethod that fixes it, if you want it fixed. (It's just a newline
> after $code)
>
> Thanks,
> Montydiff -c PerlMethod.dist/__init__.py PerlMethod/__init__.py
> *** PerlMethod.dist/__init__.py Thu Aug 3 13:53:47 2000
> --- PerlMethod/__init__.py Thu Aug 3 14:01:45 2000
> ***************
> *** 27,33 ****
> my $name = shift || "eval";
> my @warnings;
> local $SIG{__WARN__} = sub { push(@warnings, @_); };
> ! $code = qq(sub {\n# line 1 "$name"\n$code });
> my $f = eval $code;
> if ($@) {
> my $err = join("", $@, @warnings);
> --- 27,33 ----
> my $name = shift || "eval";
> my @warnings;
> local $SIG{__WARN__} = sub { push(@warnings, @_); };
> ! $code = qq(sub {\n# line 1 "$name"\n$code \n});
> my $f = eval $code;
> if ($@) {
> my $err = join("", $@, @warnings);
Applied. Thanks.
Regards,
Gisle