[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] perl5.6.1 and eval hell? SOLVED
On Tue, Jun 12, 2001 at 08:28:26PM -0400, Mike Heins wrote:
> Quoting cfm@maine.com (cfm@maine.com):
> >
> > 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]
>
> Is whitespace in short supply in Maine? 8-) And why all of this
> manipulation of the symbol tables? That really should not be
> necessary in this day and age.....
Some of us shoot at whitespace=\{deer tail} here in Maine. We
just try not to hit the house.
It's not (exactly) the symbol table thing, at least not that
particular dump codelet. Below is another example that fails
when $1 is uncommented but works when commented. It's not
dying; it must be segfaulting.
I reinstalled all perl. No difference. Installed ic4.7.3 and
it works fine. FWIW, even though I said 'no' to install
Bundle::Interchange it tried to do it anyway.
mv4.03 R.I.P. It served us well.
cfm
<HTML>
<BODY>
[raw]
{
my(@OUT,$bar,$m);
if($m=~/template=([^\w]+)/) {
$bar=$1;
# $bar='foo';
push @OUT,'Fat chance';
}
push @OUT,'done';
return join '',@OUT;
}
[/raw]
</BODY>
</HTML>
#############
## raw
# ::logGlobal($@) if($@);
# return $_[0];
UserTag raw HasEndTag 1
UserTag raw Interpolate 0
UserTag raw Routine <<EOF
sub {
my $str = eval {
my $OUT=eval $_[0];
return $@ if $@;
return $OUT;
};
$str.='<BR>my str here<BR>';
$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