File Coverage

blib/lib/Mason/Moose.pm
Criterion Covered Total %
statement 1 3 33.3
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 2 4 50.0


line stmt bran cond sub pod time code
1             package Mason::Moose; ## no critic (Moose::RequireMakeImmutable)
2             $Mason::Moose::VERSION = '2.22';
3 20     20   22414 use Moose ();
  0            
  0            
4             use MooseX::HasDefaults::RO ();
5             use MooseX::StrictConstructor ();
6             use Method::Signatures::Simple ();
7             use Moose::Exporter;
8             use strict;
9             use warnings;
10             Moose::Exporter->setup_import_methods( also => ['Moose'] );
11              
12             sub init_meta {
13             my $class = shift;
14             my %params = @_;
15             my $for_class = $params{for_class};
16             Method::Signatures::Simple->import( into => $for_class );
17             Moose->init_meta(@_);
18             MooseX::StrictConstructor->import( { into => $for_class } );
19             MooseX::HasDefaults::RO->import( { into => $for_class } );
20             {
21             no strict 'refs';
22             *{ $for_class . '::CLASS' } = sub () { $for_class }; # like CLASS.pm
23             }
24             }
25              
26             1;
27              
28             __END__
29              
30             =pod
31              
32             =head1 NAME
33              
34             Mason::Moose - Mason Moose policies
35              
36             =head1 SYNOPSIS
37              
38             # instead of use Moose;
39             use Mason::Moose;
40              
41             =head1 DESCRIPTION
42              
43             Sets certain Moose behaviors for Mason's internal classes. Using this module is
44             equivalent to
45              
46             use CLASS;
47             use Moose;
48             use MooseX::HasDefaults::RO;
49             use MooseX::StrictConstructor;
50             use Method::Signatures::Simple;
51              
52             =head1 SEE ALSO
53              
54             L<Mason|Mason>
55              
56             =head1 AUTHOR
57              
58             Jonathan Swartz <swartz@pobox.com>
59              
60             =head1 COPYRIGHT AND LICENSE
61              
62             This software is copyright (c) 2012 by Jonathan Swartz.
63              
64             This is free software; you can redistribute it and/or modify it under
65             the same terms as the Perl 5 programming language system itself.
66              
67             =cut