NAME
Constructor::Sugar - export constructor syntax sugar
VERSION
version 0.213360
SYNOPSIS
{ package My::Moo::Object; use Moo; has $_, is => 'ro' for qw( plus more ) }
{
package BasicSyntax;
my $o = My::Moo::Object->new( plus => "some", more => "data" );
die if !$o->isa( "My::Moo::Object" );
}
{
package ConstructorWrapper;
use Constructor::Sugar 'My::Moo::Object';
my $o = object plus => "some", more => "data";
die if !$o->isa( Object );
die if Object ne "My::Moo::Object";
}
AUTHOR
Christian Walde <walde.christian@gmail.com>
COPYRIGHT AND LICENSE
Christian Walde has dedicated the work to the Commons by waiving all of his or her rights to the work worldwide under copyright law and all related or neighboring legal rights he or she had in the work, to the extent allowable by law.
Works under CC0 do not require attribution. When citing the work, you should not imply endorsement by the author.