in reply to Re: Text::Template and the Binding of Package Variables
in thread Text::Template and the Binding of Package Variables

They are lexical variables, but I they are also package lexicals... to contrast: my variables do not have a package assoc'ed with them - they hang off of a piece of code. But our variables are package variables with lexical scope. The manpage talks about my variables as not working, but it may be that what you are saying about my variables applies.

Carter's compass: I know I'm on the right track when by deleting something, I'm adding functionality.

Replies are listed 'Best First'.
Re: Re: Re: Text::Template and the Binding of Package Variables
by perrin (Chancellor) on Oct 03, 2003 at 20:31 UTC
    Kind of seems like it should work, actually. You are assigning values to $main::start_date and $main::end_date and then your template runs in package main:: and refers to $start_date and $end_date without strict turned on. Maybe there's something special about the use of the main:: package. You could try declaring a package in your program and see if that helps.