[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
RE: [ic] Trying to define a new filter
> Looks like just a Perl problem -- you must use strict (i.e. my $val)
> and reference $val instead of val in your call. Also, you must have
> that in a BEGIN block to pick it up, otherwise you will have to
> call the globalsub before it is defined.
>
> GlobalSub <<EOR
> sub new_filter {
> BEGIN {
> package Vend::Interpolate;
> $Filter{reverse} = sub {
> my $val = shift;
> return scalar reverse $val;
> };
> }
> }
> EOR
>
> --
Thanks, Mike.
That works great now. Note added to the docs.
Jonathan
Webmaint.
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users