debian man page for moosex::compiletime::traits

Query: moosex::compiletime::traits

OS: debian

Section: 3pm

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

MooseX::CompileTime::Traits(3pm)			User Contributed Perl Documentation			  MooseX::CompileTime::Traits(3pm)

NAME
MooseX::CompileTime::Traits - Allow compile time traits for classes/roles
VERSION
version 1.102570
SYNOPSIS
role Bar(Int :$bar) { method bar { $bar + 2 } } role Baz(Int :$baz) { method baz { $baz + 4 } } class Foo with MooseX::CompileTime::Traits { } class Flarg with MooseX::CompileTime::Traits { } ... use Foo traits => [ Bar => { bar => 2 } ]; use Flarg traits => [ Bar => { bar => 1 }, Baz => { baz => 1} ]; Foo->new()->bar(); # 4 my $flarg = Flarg->new(); $flarg->bar(); # 3 $flarg->baz(); # 5
DESCRIPTION
MooseX::CompileTime::Traits allows role application at compile time via use statements. What this class does is provide an import method that will apply each of the roles (along with any arguments for parameterized roles). Roles and their arguments should be provided as an ArrayRef of tuples. Simply 'with' the role to gain the functionality PUBLIC_METHODS import (ClassName $class: ArrayRef :$traits?) import is provided such that when your class or role is use'd it can take additional arguments that will be validatated and interpreted as roles or traits that need to be applied.
AUTHOR
Nicholas Perez <nperez@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Infinity Interactive. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.10.1 2010-09-14 MooseX::CompileTime::Traits(3pm)
Related Man Pages
moosex::storage::traits::disablecycledetection5.18(3pm) - mojave
moosex::traits5.18(3pm) - mojave
moosex::traits(3pm) - mojave
method::signatures::modifiers(3pm) - debian
moosex::lazyrequire(3pm) - debian
Similar Topics in the Unix Linux Community
Erlang Progress Bar 0.2 (Default branch)
Geek Bar
Geek Bar II
JDK 1.6 error - simple