package MooseX::AttributeHelpers::MethodProvider::String;
use Moose::Role;
-our $VERSION = '0.17';
+our $VERSION = '0.23';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
-sub append : method {
+sub append : method {
my ($attr, $reader, $writer) = @_;
return sub { $writer->( $_[0], $reader->($_[0]) . $_[1] ) };
return sub { $writer->( $_[0], '' ) }
}
+sub length : method {
+ my ($attr, $reader, $writer) = @_;
+ return sub {
+ my $v = $reader->($_[0]);
+ return CORE::length($v);
+ };
+}
+
sub substr : method {
my ($attr, $reader, $writer) = @_;
return sub {
=head1 NAME
MooseX::AttributeHelpers::MethodProvider::String
-
+
=head1 DESCRIPTION
-This is a role which provides the method generators for
+This is a role which provides the method generators for
L<MooseX::AttributeHelpers::String>.
=head1 METHODS
=item B<clear>
+=item B<length>
+
=item B<substr>
=back
=head1 BUGS
-All complex software has bugs lurking in it, and this module is no
+All complex software has bugs lurking in it, and this module is no
exception. If you find a bug please either email me, or add the bug
to cpan-RT.