@@ -2,7 +2,6 @@ package Moo;
2
2
3
3
use strictures 1;
4
4
use Moo::_Utils;
5
- use Import::Into;
6
5
7
6
our $VERSION = ' 1.007000' ;
8
7
$VERSION = eval $VERSION ;
@@ -21,7 +20,10 @@ sub import {
21
20
my $target = caller ;
22
21
my $class = shift ;
23
22
_set_loaded(caller );
24
- strictures-> import ::into(1);
23
+
24
+ strict-> import ;
25
+ warnings-> import ;
26
+
25
27
if ($INC {' Role/Tiny.pm' } and Role::Tiny-> is_role($target )) {
26
28
die " Cannot import Moo into a role" ;
27
29
}
@@ -242,6 +244,7 @@ Moo - Minimalist Object Orientation (with Moose compatibility)
242
244
package Cat::Food;
243
245
244
246
use Moo;
247
+ use strictures 1;
245
248
use namespace::clean;
246
249
247
250
sub feed_lion {
@@ -885,22 +888,19 @@ C<BUILDARGS> is not triggered if your class does not have any attributes.
885
888
Without attributes, C<BUILDARGS > return value would be ignored, so we just
886
889
skip calling the method instead.
887
890
888
- Handling of warnings: when you C<use Moo > we enable FATAL warnings, and some
889
- several extra pragmas when used in development: L<indirect> ,
890
- L<multidimensional> , and L<bareword::filehandles> . See the L<strictures>
891
- documentation for the details on this.
892
-
893
- A similar invocation for L<Moose> would be:
894
-
895
- use Moose;
896
- use warnings FATAL => "all";
891
+ Handling of warnings: when you C<use Moo > we enable strict and warnings, in a
892
+ similar way to Moose. The authors recommend the use of C<strictures > , which
893
+ enables FATAL warnings, and some several extra pragmas when used in
894
+ development: L<indirect> , L<multidimensional> , and L<bareword::filehandles> .
895
+ See the L<strictures> documentation for the details on this.
897
896
898
897
Additionally, L<Moo> supports a set of attribute option shortcuts intended to
899
898
reduce common boilerplate. The set of shortcuts is the same as in the L<Moose>
900
899
module L<MooseX::AttributeShortcuts> as of its version 0.009+. So if you:
901
900
902
901
package MyClass;
903
902
use Moo;
903
+ use strictures 1;
904
904
905
905
The nearest L<Moose> invocation would be:
906
906
0 commit comments