foo
[gitmo/Moose-Autobox.git] / lib / Moose / Autobox / String.pm
CommitLineData
6cf5bcf2 1package Moose::Autobox::String;
2use Moose::Role;
3
4our $VERSION = '0.01';
5
31d40d73 6with 'Moose::Autobox::Value';
7
6cf5bcf2 8# perl built-ins
9
10sub lc { CORE::lc $_[0] }
11sub lcfirst { CORE::lcfirst $_[0] }
12sub uc { CORE::uc $_[0] }
13sub ucfirst { CORE::ucfirst $_[0] }
14sub chomp { CORE::chomp $_[0] }
15sub chop { CORE::chop $_[0] }
16sub reverse { CORE::reverse $_[0] }
17sub length { CORE::length $_[0] }
18sub index { CORE::index $_[0], $_[1], (defined $_[2] ? $_[2] : ()) }
19
20# FIXME: this is not working
21#sub rindex { CORE::rindex $_[0], $_[1], (defined $_[2] ? $_[2] : ()) }
22
31d40d73 231;
24
25__END__
26
27=pod
28
29=head1 NAME
30
31Moose::Autobox::String - the String role
32
33=head1 SYNOPOSIS
34
35 use Moose::Autobox;
36 use autobox;
37
38 "Hello World"->uc; # HELLO WORLD
39
40=head1 DESCRIPTION
41
8937074a 42This is a role to describes a String value.
43
260cc81f 44=head1 METHODS
45
46=over 4
47
48=item B<meta>
49
50=item B<chomp>
51
52=item B<chop>
53
54=item B<index>
55
56=item B<lc>
57
58=item B<lcfirst>
59
60=item B<length>
61
62=item B<reverse>
63
64=item B<uc>
65
66=item B<ucfirst>
67
68=back
69
31d40d73 70=head1 BUGS
71
72All complex software has bugs lurking in it, and this module is no
73exception. If you find a bug please either email me, or add the bug
74to cpan-RT.
75
76=head1 AUTHOR
77
78Stevan Little E<lt>stevan@iinteractive.comE<gt>
79
80=head1 COPYRIGHT AND LICENSE
81
82Copyright 2006 by Infinity Interactive, Inc.
83
84L<http://www.iinteractive.com>
85
86This library is free software; you can redistribute it and/or modify
87it under the same terms as Perl itself.
88
89=cut