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

Ash Berlin ash_cpan at firemirror.com
Thu May 1 13:33:22 BST 2008


On 1 May 2008, at 13:25, Jonathan Rockway wrote:

> * 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.

If also occasionally seen exceptions disappear without stack trace  
one. Its a right pain to track down what causes it (lots of source  
diving and perl -d)

-ash



More information about the Catalyst mailing list