Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

rjbs (4671)

rjbs
  (email not shown publicly)
http://rjbs.manxome.org/
AOL IM: RicardoJBSignes (Add Buddy, Send Message)
Yahoo! ID: RicardoSignes (Add User, Send Message)

I'm a Perl coder living in Bethlehem, PA and working Philadelphia. I'm a philosopher and theologan by training, but I was shocked to learn upon my graduation that these skills don't have many associated careers. Now I write code.

Journal of rjbs (4671)

Monday November 01, 2004
12:42 PM

passing undef from tt2

[ #21631 ]

url: http://template-toolkit.org/pipermail/tt3/2004-March/000050.html

It makes pretty clear the reason behind a problem I was having Friday. I wanted to include some objects from a search in a template, doing something like this:

        USE helpdesk = Class("Helpdesk::Cases"); cases = helpdesk.search( zone => 'IT', time_closed => undef );

It seems, basically, that I just can't pass undef. TT2 doesn't support the idea of undef, so it gets turned into an empty string. I tried a few tricks, but nothing really helped. I'd rather not have to write methods in the called class, although I suppose I could do something tricky in the class between all my classes and Class::DBI, filtering input before calling SUPER::search.

Is there some clever trick people are already using for this?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.