[Catalyst] $row->copy causing exit from controller(!)

Jonathan Rockway jon at jrock.us
Thu May 1 13:25:20 BST 2008


* On Thu, May 01 2008, Paul Makepeace wrote:
> I'm seeing something exceedingly odd: copying data causing a premature
> return from the controller, like a detach(),
>
>         foreach my $table (@chart_related_tables) {
>           my $rs = $ds->resultset($table);
>           warn "copying $table for ", $new_chart->uid;
>           for my $row ($rs->search({web_chart_spec_uid => $chart->uid})) {
>             warn "..row ", $row->web_chart_spec_uid, $row;
>             $row->copy({web_chart_spec_uid => $new_chart->uid});  # XXX
>           }
>           #$_->copy({web_chart_spec_uid => $new_chart->uid})
>               #for $rs->search({web_chart_spec_uid => $chart->uid});
>           die "cloned", $new_chart->uid;
>         }
>

Is copy throwing an exception?  Are you using an old version of
stacktrace?

If yes and yes: upgrade StackTrace (it eats exceptions)
If no and no: something is horribly wrong (perl -d may help)
If yes and no: see above.

I have a feeling it's the first one.  Another possibility is that "copy"
is last-ing out of itself.

Regards,
Jonathan Rockway

-- 
print just => another => perl => hacker => if $,=$"



More information about the Catalyst mailing list