MooseX-Has-Sugar

 view release on metacpan or  search on metacpan

lib/MooseX/Has/Sugar/Minimal.pm  view on Meta::CPAN

use 5.006;    # pragmas
use warnings;
use strict;

package MooseX::Has::Sugar::Minimal;

our $VERSION = '1.000006';

# ABSTRACT: Less Sugary Syntax for moose 'has' fields

our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY

use Sub::Exporter::Progressive -setup => {
  exports => [ 'ro', 'rw', 'bare', ],
  groups  => {
    is      => [ 'ro', 'rw', 'bare', ],
    default => [ '-all', ],
  },
};

















sub bare() {
  return ('bare');
}







sub ro() {
  return ('ro');
}







sub rw() {
  return ('rw');
}

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

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

=head1 VERSION

version 1.000006

=head1 SYNOPSIS

This is a legacy variant of L<Sugar|MooseX::Has::Sugar> which only exports C<ro>
and C<rw> functions, the way L<MooseX::Has::Sugar|MooseX::Has::Sugar> used to with C<: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 L<The Sub::Exporter Module|Sub::Exporter>.

=head1 EXPORT GROUPS

=head2 C<:default>

Exports L</:is>

=head2 C<:is>

Exports L</bare>, L</ro>, L</rw>

=head1 EXPORTED FUNCTIONS

=head2 C<bare>

returns C<('bare')>

=head2 C<ro>

returns C<('ro')>



( run in 0.781 second using v1.01-cache-2.11-cpan-7f9471e7e0a )