Changeset 20 in mp3-find


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

Legend:

Unmodified
Added
Removed
  • trunk/Changes

    r17 r20  
    11Revision history for Perl extension MP3::Find. 
     2 
     30.04  2 Apr 2006 
     4    - BUGFIX: fixed tests that were failing because the test mp3 was not included 
     5    - added "status_callback" option to DB backend constructor 
    26 
    370.03  27 Mar 2006 
  • 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.