added auto-strict and warnings, finished off 0.04
phaylon [Thu, 9 Aug 2007 18:58:31 +0000 (18:58 +0000)]
Changes
lib/MooseX/Types.pm

diff --git a/Changes b/Changes
index a6dfeaf..ba387a4 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,6 @@
 
-0.04    ...
-        - ...
+0.04    Thu Aug  9 20:56:14 CEST 2007
+        - Automatically set strict and warnings like Moose does
 
 0.03    Thu Aug  9 14:41:58 CEST 2007
         - Minor POD typo correction
index 18e1134..15fc683 100644 (file)
@@ -29,7 +29,6 @@ my $UndefMsg = q{Action for type '%s' not yet defined in library '%s'};
 =head2 Library Definition
 
   package MyLibrary;
-  use strict;
 
   # predeclare our own types
   use MooseX::Types 
@@ -149,6 +148,9 @@ export a L</to_$type> coercion helper for it.
 Note that you currently cannot define types containing C<::>, since 
 exporting would be a problem.
 
+You also don't need to use C<warnings> and C<strict>, since the
+definition of a library automatically exports those.
+
 =head1 LIBRARY USAGE
 
 You can import the L<"type helpers"|/"TYPE HANDLER FUNCTIONS"> of a
@@ -253,6 +255,10 @@ sub import {
     my ($class, %args) = @_;
     my  $callee = caller;
 
+    # everyone should want this
+    strict->import;
+    warnings->import;
+
     # inject base class into new library
     {   no strict 'refs';
         unshift @{ $callee . '::ISA' }, 'MooseX::Types::Base';