From: Justin Guenther Date: Thu, 11 May 2006 21:53:25 +0000 (+0000) Subject: Fixed cookbook example to actually work X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=99fb10580a48a3bbe91a118618e8ae123e8ed844;p=dbsrgits%2FDBIx-Class-Historic.git Fixed cookbook example to actually work --- diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index 5a857fb..e82426e 100644 --- a/lib/DBIx/Class/Manual/Cookbook.pod +++ b/lib/DBIx/Class/Manual/Cookbook.pod @@ -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 will automagically clean up your data before printing it. See L for more information. - =head2 Retrieving a row object's Schema It is possible to get a Schema object from a row object like so,