MouseX::AttributeHelpers::String - MouseX::AttributeHelpers::String documentation


MouseX-AttributeHelpers documentation  | view source Contained in the MouseX-AttributeHelpers distribution.

Index


NAME

Top

MouseX::AttributeHelpers::String

SYNOPSIS

Top

    package MyHomePage;
    use Mouse;
    use MouseX::AttributeHelpers;

    has 'text' => (
        metaclass => 'String',
        is        => 'rw',
        isa       => 'Str',
        default   => '',
        provides  => {
            append => 'add_text',
            clear  => 'clear_text',
        },
    );

    package main;
    my $page = MyHomePage->new;

    $page->add_text("foo"); # same as $page->text($page->text . "foo");
    $page->clear_text;      # same as $page->text('');

DESCRIPTION

Top

This module provides a simple string attribute, to which mutating string operations can be applied more easily.

PROVIDERS

Top

append

prepend

replace

match

chop

chomp

inc

clear

METHODS

Top

method_constructors

helper_type

helper_default

AUTHOR

Top

NAKAGAWA Masaki <masaki@cpan.org>

LICENSE

Top

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Top

MouseX::AttributeHelpers, MouseX::AttributeHelpers::Base


MouseX-AttributeHelpers documentation  | view source Contained in the MouseX-AttributeHelpers distribution.