Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
MooseX::Has::Sugar::MiUserlContributed Perl DocuMooseX::Has::Sugar::Minimal(3)

NAME
       MooseX::Has::Sugar::Minimal - Less Sugary Syntax	for moose 'has'	fields

VERSION
       version 1.000006

SYNOPSIS
       This is a legacy	variant	of Sugar which only exports "ro" and "rw"
       functions, the way MooseX::Has::Sugar used to with ":is";

	   use MooseX::Types::Moose qw(	Str );
	   use MooseX::Has::Sugar::Minimal;

	   has foo => (
		   isa => Str,
		   is  => ro,
		   required => 1,
	   );
	   has bar => (
		   isa => Str,
		   is => rw,
		   lazy_build => 1,
	   );

       All functions are exported by The Sub::Exporter Module.

EXPORT GROUPS
   ":default"
       Exports ":is"

   ":is"
       Exports "bare", "ro", "rw"

EXPORTED FUNCTIONS
   "bare"
       returns "('bare')"

   "ro"
       returns "('ro')"

   "rw"
       returns "('rw')"

CONFLICTS
   MooseX::Has::Sugar
   MooseX::Has::Sugar::Saccharin
       This module is not intended to be used in conjunction with
	::Sugar	or ::Sugar::Saccharin.

       We all export "ro" and "rw" in different	ways.

       If you do however want to use them in conjunction, specific imports
       must
	be done	on MooseX::Has::Sugar's	side to	stop it	exporting different
	ro/rw. Any of the below	should be fine.

	   use MooseX::Has::Sugar::Minimal;
	   use MooseX::Has::Sugar qw( :attrs );

	   has foo =>( is => rw	, lazy_build );

	   use MooseX::Has::Sugar::Minimal;
	   use MooseX::Has::Sugar qw( lazy_build );

	   has foo =>( is => rw	, lazy_build );

AUTHOR
       Kent Fredric <kentnl@cpan.org>

COPYRIGHT AND LICENSE
       This software is	copyright (c) 2017 by Kent Fredric
       <kentfredric@gmail.com>.

       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.32.0			  2017-03-03	MooseX::Has::Sugar::Minimal(3)

NAME | VERSION | SYNOPSIS | EXPORT GROUPS | EXPORTED FUNCTIONS | CONFLICTS | AUTHOR | COPYRIGHT AND LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=MooseX::Has::Sugar::Minimal&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help