foo
[gitmo/Moose-Autobox.git] / lib / Moose / Autobox / String.pm
1 package Moose::Autobox::String;
2 use Moose::Role;
3
4 our $VERSION = '0.01';
5
6 with 'Moose::Autobox::Value';
7
8 # perl built-ins
9
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] }
18 sub 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      
23 1;
24
25 __END__
26
27 =pod
28
29 =head1 NAME 
30
31 Moose::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
42 =head1 METHODS
43
44 =over 4
45
46 =item B<meta>
47
48 =item B<chomp>
49
50 =item B<chop>
51
52 =item B<index>
53
54 =item B<lc>
55
56 =item B<lcfirst>
57
58 =item B<length>
59
60 =item B<reverse>
61
62 =item B<uc>
63
64 =item B<ucfirst>
65
66 =back
67
68 =head1 BUGS
69
70 All complex software has bugs lurking in it, and this module is no 
71 exception. If you find a bug please either email me, or add the bug
72 to cpan-RT.
73
74 =head1 AUTHOR
75
76 Stevan Little E<lt>stevan@iinteractive.comE<gt>
77
78 =head1 COPYRIGHT AND LICENSE
79
80 Copyright 2006 by Infinity Interactive, Inc.
81
82 L<http://www.iinteractive.com>
83
84 This library is free software; you can redistribute it and/or modify
85 it under the same terms as Perl itself.
86
87 =cut