Revert most of the conversion to Test::Fatal so we can redo it
[gitmo/Moose.git] / lib / Moose / Cookbook / Basics / Recipe1.pod
index 4fc7e0a..8fe4a8c 100644 (file)
@@ -250,14 +250,14 @@ is( $point->y, 2, '... got the right value for y' );
 $point->y(10);
 is( $point->y, 10, '... got the right (changed) value for y' );
 
-ok exception {
+dies_ok {
     $point->y('Foo');
-},
+}
 '... cannot assign a non-Int to y';
 
-ok exception {
+dies_ok {
     Point->new();
-},
+}
 '... must provide required attributes to new';
 
 $point->clear();
@@ -267,19 +267,19 @@ is( $point->y, 0, '... got the right (cleared) value for y' );
 
 # check the type constraints on the constructor
 
-ok ! exception {
+lives_ok {
     Point->new( x => 0, y => 0 );
-},
+}
 '... can assign a 0 to x and y';
 
-ok exception {
+dies_ok {
     Point->new( x => 10, y => 'Foo' );
-},
+}
 '... cannot assign a non-Int to y';
 
-ok exception {
+dies_ok {
     Point->new( x => 'Foo', y => 10 );
-},
+}
 '... cannot assign a non-Int to x';
 
 # Point3D
@@ -299,24 +299,24 @@ is( $point3d->x, 0, '... got the right (cleared) value for x' );
 is( $point3d->y, 0, '... got the right (cleared) value for y' );
 is( $point3d->z, 0, '... got the right (cleared) value for z' );
 
-ok exception {
+dies_ok {
     Point3D->new( x => 10, y => 'Foo', z => 3 );
-},
+}
 '... cannot assign a non-Int to y';
 
-ok exception {
+dies_ok {
     Point3D->new( x => 'Foo', y => 10, z => 3 );
-},
+}
 '... cannot assign a non-Int to x';
 
-ok exception {
+dies_ok {
     Point3D->new( x => 0, y => 10, z => 'Bar' );
-},
+}
 '... cannot assign a non-Int to z';
 
-ok exception {
+dies_ok {
     Point3D->new( x => 10, y => 3 );
-},
+}
 '... z is a required attribute for Point3D';
 
 # test some class introspection