cvs commit: p5ee/App-Repository/lib/App RepositoryObject.pm

[email protected] (Stephen Adkins)
Newsgroups perl.cvs.p5ee
Message-ID <[email protected]>
cvsuser     04/10/12 07:09:09

  Modified:    App-Repository/lib/App RepositoryObject.pm
  Log:
  don't allow set() to occur unless a _key is defined
  
  Revision  Changes    Path
  1.3       +2 -1      p5ee/App-Repository/lib/App/RepositoryObject.pm
  
  Index: RepositoryObject.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/App-Repository/lib/App/RepositoryObject.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -w -r1.2 -r1.3
  --- RepositoryObject.pm	2 Sep 2004 21:01:03 -0000	1.2
  +++ RepositoryObject.pm	12 Oct 2004 14:09:09 -0000	1.3
  @@ -1,6 +1,6 @@
   
   #############################################################################
  -## $Id: RepositoryObject.pm,v 1.2 2004/09/02 21:01:03 spadkins Exp $
  +## $Id: RepositoryObject.pm,v 1.3 2004/10/12 14:09:09 spadkins Exp $
   #############################################################################
   
   package App::RepositoryObject;
  @@ -129,6 +129,7 @@
   
   sub set {
       my ($self, $attrib, $value, $options) = @_;
  +    die "Can't set values: _key not defined on object[$self->{_table}]" if (! defined $self->{_key});
       my $nrows = $self->{_repository}->set($self->{_table}, $self->{_key}, $attrib, $value);
       if (ref($attrib) eq "ARRAY") {
           for (my $i = 0; $i <= $#$attrib; $i++) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.