/[cwmp]/google/lib/CWMP/Store.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /google/lib/CWMP/Store.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 84 by dpavlin, Fri Jun 22 18:25:24 2007 UTC revision 85 by dpavlin, Fri Jun 22 18:36:09 2007 UTC
# Line 65  sub update_state { Line 65  sub update_state {
65          confess "need ID" unless $ID;          confess "need ID" unless $ID;
66          confess "need state" unless $state;          confess "need state" unless $state;
67    
   
68          if ( my $o = $self->db->get( $ID ) ) {          if ( my $o = $self->db->get( $ID ) ) {
69                  warn "## update state of $ID\n" if $self->debug;                  warn "## update state of $ID\n" if $self->debug;
70                  $o->import( $state );                  $o->import( $state );
# Line 75  sub update_state { Line 74  sub update_state {
74          }          }
75                    
76  }  }
77    
78    =head2 state
79    
80      my $state = $store->state( $ID );
81    
82    Returns normal unblessed hash (actually, in-memory copy of state in database).
83    
84    =cut
85    
86    sub state {
87            my $self = shift;
88            my ( $ID ) = @_;
89            confess "need ID" unless $ID;
90            return $self->db->get( $ID )->export;
91    }
92    
93  1;  1;

Legend:
Removed from v.84  
changed lines
  Added in v.85

  ViewVC Help
Powered by ViewVC 1.1.26