Valiant::Filter::Title - title case a string
package Local::Test::User; use Moo; use Valiant::Filters; has 'name' => (is=>'ro', required=>1); filters name => ( title => 1, ); my $user = Local::Test::User->new(name=>'john napiorkowski'); print $user->name; # 'John Napiorkowski'
This is a very simple filter that takes no paramters and just does title case (that is the first letter of each word becomes upper case) on the value of the attribute.
Valiant, Valiant::Filter, Valiant::Validator::Filter.
See Valiant
To install Valiant, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Valiant
CPAN shell
perl -MCPAN -e shell install Valiant
For more information on module installation, please visit the detailed CPAN module installation guide.