GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MOOSEX::HAS::SUGAR::SACCHARIN (3)

.ds Aq ’

NAME

MooseX::Has::Sugar::Saccharin - Experimental sweetness

CONTENTS

VERSION

version 1.000004

SYNOPSIS

This is a highly experimental sugaring module. No Guarantees of stability.



    use MooseX::Types::Moose qw( :all );
    has name   => rw Str, default { 1 };
    has suffix => required rw Str;
    has suffix, required rw Str;



Your choice.

EXPORT GROUPS

CW:default

exports:

ro, rw, required, lazy, lazy_build, coerce, weak_ref, auto_deref, bare, default, init_arg, predicate, clearer, builder, trigger

EXPORTED FUNCTIONS

CWbare

CWbare CW$Type



    bare Str



equivalent to this



    is => bare, isa => Str



CWro

CWro CW$Type



    ro Str



equivalent to this



    is => ro, isa => Str,



CWrw

CWrw CW$Type



    rw Str



equivalent to this



    is => rw, isa => Str



CWrequired

CWrequired @rest

this



    required rw Str



is equivalent to this



    required => 1, is => rw, isa => Str,



this



    rw Str, required



is equivalent to this



    is => rw, isa => Str , required => 1



CWlazy

CWlazy @rest

like ( lazy => 1 , @rest )

CWlazy_build

CWlazy_build @rest

like ( lazy_build => 1, @rest )

CWweak_ref

CWweak_ref @rest

like ( weak_ref => 1, @rest )

CWcoerce

CWcoerce @rest

like ( coerce => 1, @rest )

WARNING:

Conflicts with MooseX::Typess coerce method

CWauto_deref

CWauto_deref @rest

like ( auto_deref => 1, @rest )

CWbuilder

CWbuilder $buildername



    required rw Str, builder _build_foo



is like



    builder => _build_foo



CWpredicate

CWpredicate $predicatename

see builder

CWclearer

CWclearer $clearername

see builder

CWinit_arg

CWinit_arg $argname

see builder

CWdefault

CWdefault { $code }

Examples:



    default { 1 }
    default { { } }
    default { [ ] }
    default { $_->otherfield }



$_ is localized as the same value as $_[0] for convenience ( usually $self )

CWtrigger

CWtrigger { $code }

Works exactly like default.

CONFLICTS

    MooseX::Has::Sugar

    MooseX::Has::Sugar::Minimal

This module is not intended to be used in conjunction with
::Sugar or ::Sugar::Minimal

We export many of the same symbols and its just not very sensible.

    MooseX::Types

    Moose::Util::TypeConstraints

due to exporting the coerce symbol, using us in the same scope as a call to



    use MooseX::Types ....



or
use Moose::Util::TypeConstraints

will result in a symbol collision.

We recommend using and creating proper type libraries instead, ( which will absolve you entirely of the need to use MooseX::Types and MooseX::Has::Sugar(::*)? in the same scope )

    Perl 5.010 feature ’switch’

the keyword ’default’ becomes part of Perl in both these cases:



    use 5.010;
    use feature qw( :switch );



As such, we can’t have that keyword in that scenario.

AUTHOR

Kent Fredric <kentnl at cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Kent Fredric.

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

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 MOOSEX::HAS::SUGAR::SACCHARIN (3) 2014-08-16

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.