MARC::Field->as_string() takes a string of subfields rather than an array.
It would be better for as_string() and delete_subfields() to have the same
interface.  Since as_string() is used a lot in production,
delete_subfields() should be the one to change.

Mike O'Regan



                                                                                       
                                       
                      Ed Summers                                                       
                                       
                      <[EMAIL PROTECTED]>          To:       [EMAIL PROTECTED]         
                                           
                                               cc:                                     
                                       
                      08/17/2004 10:09         Subject:  delete_subfields()            
                                       
                      AM                                                               
                                       
                                                                                       
                                       
                                                                                       
                                       




Jackie Shieh at Univ of Michigan thought it would be handy to have a
delete_subfields() method on MARC::Field objects. Basically the
method takes a list of subfields to delete, and deletes each one,
returning the total subfields that were removed. If a subfield
repeats all of them are deleted.

    $field->delete_subfields( 'z' );

I've committed the new method and a few tests to SourceForge if
anyone is interested in taking a look. [1]

//Ed

[1] http://prdownloads.sourceforge.net/marcpm/MARC-Record-1.4.tar.gz




Reply via email to