I just uploaded version 0.1003 to CPAN. It includes the following addition:
=head2 Using another suffix Do not change the suffix unless you truly must. If for some reason you cannot use the standard C<_c> suffix, you can override it by changing C<$AutoCurry::suffix> I<for the duration of your calls to AutoCurry>. Use C<do> and C<local> to limit the scope of your changes: use AutoCurry; # suffix changing is not compatible with ':all' my @curried_fns = do { local $AutoCurry::suffix = "_curry"; AutoCurry::curry_package(); }; # result: ( "main::foo_curry" ) sub foo { ... }; # foo_curry will be created by call to curry_package, above
I cannot use the BEGIN approach that you suggested because that would override the suffix for all subsequent users of AutoCurry, not just the current package.
Tom Moertel : Blog / Talks / CPAN / LectroTest / PXSL / Coffee / Movie Rating Decoder
In reply to Re^4: Near-free function currying in Perl
by tmoertel
in thread Near-free function currying in Perl
by tmoertel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |