-
-
01 Feb 2019 05:15:20 UTC
- Distribution: Mus
- Module version: 0.02
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (0)
- Testers (308 / 0 / 5)
- Kwalitee
Bus factor: 0- 100.00% Coverage
- License: perl_5
- Perl: v5.8.5
- Activity
24 month- Tools
- Download (9.76KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Mus - Mu but with slightly more typing and strict constructors
STATUS
SYNOPSIS
package Foo; use Mus; ro "hro"; lazy hlazy => sub { 2 }; rwp "hrwp"; rw "hrw"; my $foo = Foo->new(i_dont_exist => 5, hro => "exists", hrwp => "exists", hrw => "exists"); # Found unknown attribute(s) passed to the constructor: i_dont_exist at (eval 30) line 52. # Foo::new("Foo", "i_dont_exist", 5, "hro", "exists", "hrwp", "exists", "hrw", ...) called at Foo.pl line 9
DESCRIPTION
Mus imports both Mu and MooX::StrictConstructor making it even less work in typing and reading to set up an object with a strict constructor.
Mu::Role should still be used for roles, as strict constructors don't apply to roles, so I did not duplicate this.
AUTHOR
Adam Hopkins <srchulo@cpan.org>
COPYRIGHT
Copyright 2019- Adam Hopkins
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Module Install Instructions
To install Mus, copy and paste the appropriate command in to your terminal.
cpanm Mus
perl -MCPAN -e shell install Mus
For more information on module installation, please visit the detailed CPAN module installation guide.