Add a comment
[gitmo/Mouse.git] / lib / Squirrel.pm
index 039b7e4..565a3e2 100644 (file)
@@ -1,7 +1,4 @@
-#!/usr/bin/perl
-
 package Squirrel;
-
 use strict;
 use warnings;
 
@@ -27,10 +24,13 @@ sub _handlers {
 
     my $caller = caller(1);
 
-    $pkgs{$caller} ||= $class->_choose_backend;
+    $pkgs{$caller} = $class->_choose_backend
+        unless $pkgs{$caller};
 }
 
 sub import {
+    require Carp;
+    Carp::carp("Squirrel is deprecated. Please use Any::Moose instead. It fixes a number of design problems that Squirrel has.");
     goto $_[0]->_handlers->{import};
 }
 
@@ -38,7 +38,7 @@ sub unimport {
     goto $_[0]->_handlers->{unimport};
 }
 
-__PACKAGE__
+1;
 
 __END__
 
@@ -56,6 +56,11 @@ Squirrel - Use L<Mouse>, unless L<Moose> is already loaded.
         is => "rw", 
     );
 
+=head1 DEPRECATION
+
+L<Squirrel> is being deprecated. L<Any::Moose> provides the same functionality,
+but better. :)
+
 =head1 DESCRIPTION
 
 L<Moose> and L<Squirrel> are TEH BEST FRENDS, but if L<Moose> isn't there
@@ -65,7 +70,8 @@ When your own code doesn't actually care whether or not you use L<Moose> or
 L<Mouse> you can use either, and let your users decide for you.
 
 This lets you run with minimal dependencies and have a faster startup, but if
-L<Moose> is already in use you get all the benefits of using that.
+L<Moose> is already in use you get all the benefits of using that
+(transformability, introspection, more opportunities for code reuse, etc).
 
 =cut