Fixed cookbook example to actually work
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Manual / Cookbook.pod
index 5a857fb..e82426e 100644 (file)
@@ -753,11 +753,10 @@ dumping it. For example,
   package My::DB::CD;
 
   sub _dumper_hook {
-    my $obj = shift;
-    return bless {
-      %{ $obj },
+    $_[0] = bless {
+      %{ $_[0] },
       result_source => undef,
-    }, ref($obj);
+    }, ref($_[0]);
   }
 
   [...]
@@ -776,7 +775,6 @@ base class and set C<$Data::Dumper::Freezer> to its name and L<Data::Dumper>
 will automagically clean up your data before printing it. See
 L<Data::Dumper/EXAMPLES> for more information.
 
-
 =head2 Retrieving a row object's Schema
 
 It is possible to get a Schema object from a row object like so,