> perl doesn't eval $data->$field in the way you expect it to. you would > have to do something like > > my $val = $data; > foreach my $method (split(/\./, $field)) { > $val = $val->$method; > } > $ws->write($row, $col, $val); > > to make your code more robust, you should add some sanity checking, like > > if ($val->can($method)) { ... } > > HTH > > patrick > > -- > Patrick Meidl ........................ patr...@pantheon.at
I'm almost there, having some issues with null values. I keep getting an error about not being able to perform object method on an undefined etc. I can't find my way around it. I tried this and it sets it to 0 but still bombs out with the same error.
_______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk