allow single-value enums
[gitmo/Moose.git] / lib / Moose / Cookbook / Extending / Recipe3.pod
index 544a86f..ea75547 100644 (file)
@@ -1,23 +1,20 @@
+package Moose::Cookbook::Extending::Recipe3;
+
+# ABSTRACT: Providing an alternate base object class
+
+__END__
+
 
 =pod
 
 =begin testing-SETUP
 
-BEGIN {
-    eval 'use Test::Warn 0.11;';
-    if ($@) {
-        diag 'Test::Warn 0.11+ is required for this test';
-        ok(1);
-        exit 0;
-    }
-}
+use Test::Requires {
+    'Test::Output' => '0',
+};
 
 =end testing-SETUP
 
-=head1 NAME
-
-Moose::Cookbook::Extending::Recipe3 - Providing an alternate base object class
-
 =head1 SYNOPSIS
 
   package MyApp::Base;
@@ -43,7 +40,7 @@ Moose::Cookbook::Extending::Recipe3 - Providing an alternate base object class
 =head1 DESCRIPTION
 
 A common extension is to provide an alternate base class. One way to
-do that is to make a C<MyApp::base> and add C<S<extends
+do that is to make a C<MyApp::Base> and add C<S<extends
 'MyApp::Base'>> to every class in your application. That's pretty
 tedious. Instead, you can create a Moose-alike module that sets the
 base object class to C<MyApp::Base> for you.
@@ -87,19 +84,6 @@ This is an awful lot of magic for a simple base class. You will often
 want to combine a metaclass trait with a base class extension, and
 that's when this technique is useful.
 
-=head1 AUTHOR
-
-Dave Rolsky E<lt>autarch@urth.orgE<gt>
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 2006-2009 by Infinity Interactive, Inc.
-
-L<http://www.iinteractive.com>
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
 =begin testing
 
 {
@@ -115,9 +99,9 @@ ok( Foo->isa('MyApp::Base'), 'Foo isa MyApp::Base' );
 ok( Foo->can('size'), 'Foo has a size method' );
 
 my $foo;
-warning_is(
+stderr_like(
     sub { $foo = Foo->new( size => 2 ) },
-    'Making a new Foo',
+    qr/^Making a new Foo/,
     'got expected warning when calling Foo->new'
 );