-
-
18 Feb 2019 06:15:56 UTC
- Distribution: MooX-ChainedAttributes
- Module version: 0.07
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (552 / 0 / 0)
- Kwalitee
Bus factor: 1- 92.68% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (9.74KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Moo
- strictures
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
MooX::ChainedAttributes - Make your attributes chainable.
SYNOPSIS
package Foo; use Moo; use MooX::ChainedAttributes; has name => ( is => 'rw', chained => 1, ); has age => ( is => 'rw', ); chain('age'); sub who { my ($self) = @_; print "My name is " . $self->name() . "!\n"; } my $foo = Foo->new(); $foo->name('Fred')->who(); # My name is Fred!
DESCRIPTION
This module exists for your method chaining enjoyment. It was originally developed in order to support the porting of MooseX::Attribute::Chained using classes to Moo.
In Moose you would write:
package Bar; use Moose; use MooseX::Attribute::Chained; has baz => ( is=>'rw', traits=>['Chained'] );
To port the above to Moo just change it to:
package Bar; use Moo; use MooX::ChainedAttributes; has baz => ( is=>'rw', chained=>1 );
AUTHOR
Aran Clary Deltac <bluefeet@gmail.com>
CONTRIBUTORS
Graham Knop <haarg@haarg.org>
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install MooX::ChainedAttributes, copy and paste the appropriate command in to your terminal.
cpanm MooX::ChainedAttributes
perl -MCPAN -e shell install MooX::ChainedAttributes
For more information on module installation, please visit the detailed CPAN module installation guide.