----- Original Message ----
From: John Siracusa <[EMAIL PROTECTED]>
> > $self->delete_suspended;
> > $self->save;
> > diag Dumper($self->suspended);
> >
> > Nope:
> >
> > not ok 5 - cannot_reinitialize died (No foreign key named 'suspended' at
> > /usr/local/lib/perl5/site_perl/5.8.7/Rose/DB/Object.pm line 539 ...
> > # eval {...} called at
> > /usr/local/lib/perl5/site_perl/5.8.7/Rose/DB/Object.pm line 478
> > # Rose::DB::Object::save() called at lib/Donhost/Server/Dedicated.pm
> > line 563
>
> Is "cannot_reinitialize" one of your methods? If so, what does it look
> like?
Er, um, it's an embarrassing holdover from an earlier refactoring.
sub cannot_reinitialize {
my $self = shift;
if ( $self->suspended ) {
return 'Suspended';
}
elsif ( $self->state eq none qw/ allocated install_failed / ) {
return 'Not allocated';
}
elsif ( !$self->has_standard_hardware ) {
return 'Running on non-standard hardware';
}
return;
}
And before you ask :)
sub has_standard_hardware {
defined shift->_hardware_spec_id;
}
('_hardware_spec_id' merely refers to a varchar(32) column. Nothing unusual
about it)
Cheers,
Ovid
--
Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object