Sympatic::Role - A Moo::Role with all the Sympatic magic.
you can write this
use Sympatic::Role;
instead of this
use Sympatic -class;
so writing a Sympatic role Flyable is just like
Flyable
package Flyable; use Sympatic::Role; method fly () { $self->altitude += 10 } 1;
and use it in your Pet class
Pet
package Pet; use Sympatic; with 'Flyable'; has qw( altitude is rw lvalue 1 default 0 ); has qw( name is rw ); 1;
Copyright 2018 Sympa community <sympa-developpers@listes.renater.fr>
This package is free software and is provided "as is" without express or implied warranty. you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Copyright (C) 2017,2018 Sympa Community Sympatic is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Sympatic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
To install Sympatic, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sympatic
CPAN shell
perl -MCPAN -e shell install Sympatic
For more information on module installation, please visit the detailed CPAN module installation guide.