[ic] Filter not working after Perl reinstall
Stefan Hornburg (Racke)
racke at linuxia.de
Tue Aug 30 19:18:02 UTC 2011
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 { ... }
2. If that doesn't help, call Date::Manip::UnixDate instead of just UnixDate.
Regards
Racke
--
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team
More information about the interchange-users
mailing list