Hi, I have a bit of a problem, that I am SURE there must a simple solution
for, but I can't work it out.
 
I have a very simple module which just contains some subroutines to return a
drop down list of days of the month, with the current day selected.  This is
going to be used in a few spots, so I wanted to put it in a nice central
area.
 
There is another module, that takes the results of subroutines (always a
string) and replaces variables on a HTML template with them.
 
It calls it by requiring the replace variable and the subroutine:  eg
 
MID => [\&returnme, $merchant_id]  where MID is the variable being replaced,
returnme is the subvariable, and $merchant_id is a variable the function
needs.
 
This works fine whenever the sub is within my perl script, but for all the
ones in my third party module, it falls over with a "no a code reference"
 
It is probably how I am calling it, but I can't work out how!  I have
 
StartDay => [\DropDates::showdays, "startday", "19"] where DropDates is the
name of the module, and showdays is the sub I want.
 
I've also tried DropDates::&showdays, but that also doesn't work.
 
Any ideas?  I'm using strict in all modules, and I can't change the HTML
template module, as it is not my property.
 
Thanks!
 
Di

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to