[Petal] compiled expression (again)

Fergal Daly fergal at esatclear.ie
Thu Jun 19 17:17:15 BST 2003


On Thursday 19 June 2003 14:33, Jean-Michel Hiver wrote:
> I have one major problem with that: warnings which would be triggered by
> falty code in the methods that you're calling from the templates would
> be hidden as well. And calling methods from templates is something I do
> a lot.

I agree with you. Turning off warnings is not a great idea, however if you do

{
	no warnings 'blah';
	$things->method();
}

the no warnings has no effect on the code in the method, it only effects code 
directly inside the {}. This would be the best of both worlds. Unfortunately 
the Safe module prevents us from doing a no warnings but there should be a 
way around that. I'll keep poking.

> So I would be more than keen to sacrifice a bit of speed to get the
> important debugging info I need.
> 
> So maybe:
> 
> > * $res .= do {my $v = $hash->{"user"}; defined($v) ? $v : ""};

It's not such a big deal to make it all configurable. Hopefully I can get 
something onto CPAN tomorrow,

F



More information about the Petal mailing list