1 package Moose::Autobox::String;
6 with 'Moose::Autobox::Value';
10 sub lc { CORE::lc $_[0] }
11 sub lcfirst { CORE::lcfirst $_[0] }
12 sub uc { CORE::uc $_[0] }
13 sub ucfirst { CORE::ucfirst $_[0] }
14 sub chomp { CORE::chomp $_[0] }
15 sub chop { CORE::chop $_[0] }
16 sub reverse { CORE::reverse $_[0] }
17 sub length { CORE::length $_[0] }
19 return CORE::index($_[0], $_[1]) if scalar @_ == 2;
20 return CORE::index($_[0], $_[1], $_[2]);
23 # FIXME: this is not working
24 #sub rindex { CORE::rindex $_[0], $_[1], (defined $_[2] ? $_[2] : ()) }
34 Moose::Autobox::String - the String role
41 "Hello World"->uc; # HELLO WORLD
45 This is a role to describes a String value.
79 All complex software has bugs lurking in it, and this module is no
80 exception. If you find a bug please either email me, or add the bug
85 Stevan Little E<lt>stevan@iinteractive.comE<gt>
87 =head1 COPYRIGHT AND LICENSE
89 Copyright 2006 by Infinity Interactive, Inc.
91 L<http://www.iinteractive.com>
93 This library is free software; you can redistribute it and/or modify
94 it under the same terms as Perl itself.