[ic] perl5.6.1 and eval hell?
interchange-users@lists.akopia.com
interchange-users@lists.akopia.com
Tue Jun 12 17:36:01 2001
We upgraded some dev machines to debian 5.6.1 perl
from 5.6.0 over the weekend. There are some changes
in perl that I've not really figured out but thought
a heads up might be in order. Lots of our embedded
perl refuses to run.
For example, my dumper script dies now. It returns nothing.
If I run this I get HELLO WORLD but if I uncomment
# push @OUT,$@ if($@); Go figure.
I get nothing at all. No error, a 1 byte return.
<(3861/1) Read error: cgi_headers: Success>
This page:
# dump.html
# rev 2000-12-21, cfm
[tag op=header]
Content-Type: text/plain
[/tag]
[raw]
{
no strict 'refs';
my(@OUT,$type);
eval {
for(keys %{*::}) {
for $type (qw(CODE ARRAY HASH IO SCALAR)) {
my($a);
# $a = *$_{$type}; # 5.6.1 no go
next unless $a;
# push @OUT,"$_ \t${*::}{$_} $a\n"; # 5.6.1 no go
}
}
};
push @OUT,'HELLO WORLD';
# push @OUT,$@ if($@);
return join '<BR>',@OUT;
}
[/raw]
This minimalist raw perl tag:
UserTag raw HasEndTag 1
UserTag raw Interpolate 0
UserTag raw Routine <<EOF
sub {
my $str = eval {
my $OUT=eval $_[0];
return $OUT;
};
::logGlobal($@) if($@);
$str;
}
EOF
--
Christopher F. Miller, Publisher cfm@maine.com
MaineStreet Communications, Inc 208 Portland Road, Gray, ME 04039
1.207.657.5078 http://www.maine.com/
Content management, electronic commerce, internet integration, Debian linux