RE: [Maypole] Template DEBUG, warnings and new

From: Simon Flack (simon.flack at bbc.co.uk)
Date: Tue Dec 14 2004 - 13:34:26 GMT


Dave Howorth wrote:
> Dave Howorth wrote:
>> my $template = Template->new( {
>> INCLUDE_PATH => [ $self->paths($r) ],
>> DEBUG => DEBUG_DIRS,
>> } );
>
> Well, I fixed that problem. Turns out you need to use
> Template::Constants to say that but saying DEBUG => 'dirs' works OK.

or just quote the value:

         DEBUG => 'DEBUG_DIRS',

>> I noticed that my print statement wasn't producing a warning (my
>> driver class has use warnings). So I put use warnings into
>> Maypole::View::TT and sure enough saw:
>>
>> Use of uninitialized value in concatenation (.) or string
>>
>> just before my print statement. Does anybody know what is turning off
>> warnings somewhere inside Maypole?
>
> But discovering the fix to my main problem deepened my worry about
> this. In the little test program I wrote, I saw:
>
> Bareword "DEBUG_DIRS" not allowed while "strict subs" in use
>
> but I'm not even seeing that from the code in Maypole, so it seems
> something somewhere is playing fast and loose with strictness and
> warnings.

strict and warnings are lexical pragmas and aren't used by M::V::TT,
which is why you didn't see those errors.

--simonflk

http://www.bbc.co.uk/

This e-mail (and any attachments) is confidential and may contain
personal views which are not the views of the BBC unless specifically
stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in
reliance on it and notify the sender immediately. Please note that the
BBC monitors e-mails sent or received.
Further communication will signify your consent to this.

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT