in reply to Re: Class::DBI question
in thread Class::DBI question

What I'd like is a method called "update" that works like "create":

# as yet wishfull thinking... my $cd = Music::CD->update({ cdid => 1, artist => $artist, title => 'October', year => 1980, });

I'm surprized that one hasn't been written like this already. I may have to write this myself, but it would be nice not have to.

-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday

Replies are listed 'Best First'.
Re: Re: Re: Class::DBI question
by PodMaster (Abbot) on Oct 20, 2003 at 23:32 UTC
    I'm surprized that one hasn't been written like this already. I may have to write this myself, but it would be nice not have to.
    Well, it's called set
    my $cd = Music::CD->retrieve( cdid => 1 ) or die "no cd 1"; $cd->set( artist => $artist, title => 'October', year => 1980, );
    update: that's why they call me PodMaster ;D

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      Yup, that's the ticket. Mea Culpa, it is in the docs, just not where I was looking for it.

      Thanks

      -------------------------------------
      Nothing is too wonderful to be true
      -- Michael Faraday