[ic] Filter not working after Perl reinstall

Bill Carr bill at bottlenose-wine.com
Tue Aug 30 20:02:32 UTC 2011


On Aug 30, 2011, at 3:18 PM, Stefan Hornburg (Racke) wrote:

> On 08/30/2011 07:27 PM, Bill Carr wrote:
>> After apt-get replaced my non-threaded perl on my Debian box I reinstalled perl and I'm now getting the following error:
>> 
>> Safe: Undefined subroutine&Vend::Interpolate::UnixDate called at (tag 'cgi') line 9
>> 
>> Below is my Filter which references UnixDate
>> 
>> CodeDef date_mysql Filter
>> CodeDef date_mysql Version $Id$
>> CodeDef date_mysql Description Format values from date_time widget for MySQL
>> CodeDef date_mysql Routine<<EOR
>> sub {
>>     use Date::Manip;
>> 	my $in = shift;
>> 
>>     $in =~ s/[^\w\d\/\-,: ]//sg; # Remove mystery characters
>> 
>> 	my $out = '';
>> 	$out = (join '-', $3, $1, $2) if $in =~ m{^(\d{1,2})/(\d{1,2})/(\d{4})$};
>> 	$out ||= UnixDate($in,"%Y-%m-%d %H:%M:%S");
>> 
>>     return $out;
>> }
>> EOR
>> 
>> Using UnixDate in a script outside of Interchange works fine.
>> 
>> How can I fix this?
>> 
> 
> 1. Put "use Date::Manip" before sub { ... }
I tried that and it didn't work.

> 2. If that doesn't help, call Date::Manip::UnixDate instead of just UnixDate.
That also did not work.

What's weird is this only happening on one of four hosts that are nearly identical.

Here is from the host where I'm having the problem.
www at tomcollins:~$ perl -MDate::Manip -e 'print DateManipVersion() . "\n"'
6.24

I put this on a page being served by Interchange running on said host and I get  the error below.
<pre>
HELLO WORLD
[perl global=1]
        use Date::Manip;
        return Date::Manip::DateManipVersion();
[/perl]
</pre>

192.168.3.243 9SAcFYaD:nobody - [30/August/2011:16:01:21 -0400] bottlenose-wine.com tomcollins/j Safe: Undefined subroutine &Date::Manip::DateManipVersion called at (tag 'perl') line 3.

  
Bill Carr 



More information about the interchange-users mailing list