User Tools

Site Tools


esmith:db

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
esmith:db [2015/05/22 07:29]
stephdl [Virtual Methods]
esmith:db [2019/06/05 19:48] (current)
Line 114: Line 114:
 here an example here an example
  
- {+  {
       use esmith::HostsDB;       use esmith::HostsDB;
       $DB = esmith::HostsDB->open;       $DB = esmith::HostsDB->open;
- +  
       # Purge quoting chars in comments to fix bug 8723 & bug 8806       # Purge quoting chars in comments to fix bug 8723 & bug 8806
       foreach my $host ($DB->get_all)       foreach my $host ($DB->get_all)
Line 126: Line 126:
           $host->merge_props(Comment => $comment);           $host->merge_props(Comment => $comment);
       }       }
- }+  }
  
 ===== Concrete methods ===== ===== Concrete methods =====
Line 158: Line 158:
  
         my $value = 'default';         my $value = 'default';
- +  
         if (my $r = $db->get("foo"))         if (my $r = $db->get("foo"))
         {         {
Line 183: Line 183:
  
     my $status;     my $status;
- +  
     if (my $s = $db->get("foo")) { $status = $s->prop('status'); }     if (my $s = $db->get("foo")) { $status = $s->prop('status'); }
- +  
     $status ||= 'default';     $status ||= 'default';
  
esmith/db.1432279776.txt.gz ยท Last modified: 2019/06/05 19:48 (external edit)