Show quoted text> Please declare %ignore with "our" instead of "my", so I can mess with it ;)
Sorry, Alessandro, but I can't do that.
Interfaces that include package variables are nasty and dangerous.
So, instead, I'll give you something much safer, and yet even more powerful. ;-)
I just uploaded a new version of the module that allows you to pass
a subroutine reference to the 'case' option. That subroutine is applied
to each word and whatever it returns is how the word is transformed.
For example:
my $text = "so i can mess about with it in evil ways";
sub my_casing {
my @LOWER = qw( about can );
my @UPPER = qw( evil mess );
my ($word) = @_;
return $word ~~ @LOWER ? lc($word)
: $word ~~ @UPPER ? uc($word)
: ucfirst(lc($word));
}
print autoformat {case => 'title'}, $text; # So I Can Mess
About With It In Evil Ways
print autoformat {case => 'highlight'}, $text; # So I Can Mess
About with It in Evil Ways
print autoformat {case => \&my_casing}, $text; # So I can MESS
about With It In EVIL Ways
Hope that helps!
Damian