Caleb Cushing > MooseX-RemoteHelper-0.001011 > MooseX::RemoteHelper::Meta::Trait::Attribute

Download:
MooseX-RemoteHelper-0.001011.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.001011   Source   Latest Release: MooseX-RemoteHelper-0.001021

NAME ^

MooseX::RemoteHelper::Meta::Trait::Attribute - role applied to meta attribute

VERSION ^

version 0.001011

ATTRIBUTES ^

remote_name

the name of the attribute key on the remote host. if no remote_name is provided it should be assumed that the attribute is not used on the remote but is instead local only. MooseX::RemoteHelper::CompositeSerialization will not serialize an attribute that doesn't have a remote_name

        has perlish => (
                isa         => 'Str',
                remote_name => 'MyReallyJavaIshKey',
                is          => 'ro',
        );

serializer

a code ref for converting the real value to what the remote host expects. it requires that you pass the attribute and the instance. e.g.

        has foo_bar => (
                isa         => 'Bool',
                remote_name => 'FooBar',
                serializer  => sub {
                        my ( $attr, $instance ) = @_;
                        return $attr->get_value( $insance ) ? 'T' : 'F';
                },
        );

METHODS ^

serialized

returns the attributed value by using the serializer.

BUGS ^

Please report any bugs or feature requests on the bugtracker website https://github.com/xenoterracide/MooseX-RemoteHelper/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO ^

Please see those modules/websites for more information related to this module.

AUTHOR ^

Caleb Cushing <xenoterracide@gmail.com>

COPYRIGHT AND LICENSE ^

This software is Copyright (c) 2012 by Caleb Cushing.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)
syntax highlighting: