Changeset 20 in mp3-find for trunk/lib/MP3/Find


Ignore:
Timestamp:
04/02/06 21:14:53 (19 years ago)
Author:
peter
Message:
  • documented "status_callback" in DB.pm
  • updated Changes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/MP3/Find/DB.pm

    r19 r20  
    275275=head1 METHODS 
    276276 
     277=head2 new 
     278 
     279    my $finder = MP3::Find::DB->new( 
     280        status_callback => \&callback, 
     281    ); 
     282 
     283The C<status_callback> gets called each time an entry in the 
     284database is added, updated, or deleted by the C<update_db> and 
     285C<sync_db> methods. The arguments passed to the callback are 
     286a status code (A, U, or D) and the filename for that entry. 
     287The default callback just prints these to C<STDERR>: 
     288 
     289    sub default_callback { 
     290        my ($status_code, $filename) = @_; 
     291        print STDERR "$status_code $filename\n"; 
     292    } 
     293 
     294To suppress any output, set C<status_callback> to an empty sub: 
     295 
     296    status_callback => sub {} 
     297 
    277298=head2 create_db 
    278299 
Note: See TracChangeset for help on using the changeset viewer.