autoboxing
[gitmo/Moose-Autobox.git] / lib / Moose / Autobox / String.pm
diff --git a/lib/Moose/Autobox/String.pm b/lib/Moose/Autobox/String.pm
new file mode 100644 (file)
index 0000000..1a57f4a
--- /dev/null
@@ -0,0 +1,21 @@
+package Moose::Autobox::String;
+use Moose::Role;
+
+our $VERSION = '0.01';
+
+# perl built-ins
+
+sub lc      { CORE::lc      $_[0] }
+sub lcfirst { CORE::lcfirst $_[0] }
+sub uc      { CORE::uc      $_[0] }
+sub ucfirst { CORE::ucfirst $_[0] }
+sub chomp   { CORE::chomp   $_[0] }
+sub chop    { CORE::chop    $_[0] }
+sub reverse { CORE::reverse $_[0] }
+sub length  { CORE::length  $_[0] }
+sub index   { CORE::index   $_[0], $_[1], (defined $_[2] ? $_[2] : ()) }
+
+# FIXME: this is not working 
+#sub rindex  { CORE::rindex  $_[0], $_[1], (defined $_[2] ? $_[2] : ()) }
+     
+1;
\ No newline at end of file