Re: Return values from MARC::Record

2003-11-07 Thread Paul Hoffman
On Friday, November 7, 2003, at 11:29 AM, Leif Andersson wrote: You mean 5.005? Maybe that's what is required. Oops, yes, thanks for the correction. Paul. -- Paul Hoffman :: Taubman Medical Library :: Univ. of Michigan [EMAIL PROTECTED] :: [EMAIL PROTECTED] :: http://www.nkuitse.com/

Re: Return values from MARC::Record

2003-11-07 Thread Ed Summers
On Fri, Nov 07, 2003 at 05:29:09PM +0100, Leif Andersson wrote: > What I am trying to do is to identify areas in the API where improvments can > be done. Much appreciated. The return values should be consistent 0/undef, athough logically they amount to the same thing in Perl. Could you add a tic

Re: Return values from MARC::Record

2003-11-07 Thread Ed Summers
On Fri, Nov 07, 2003 at 08:07:18AM +0100, Leif Andersson wrote: > And it shouldn't even break any existing code. Shouldn't :) But it will be an additional dependency, that is mostly superfluous. Interesting bit of code though! Thanks for sharing. //Ed

Re: Return values from MARC::Record

2003-11-07 Thread Leif Andersson
You mean 5.005? Maybe that's what is required. Perl 5.6 is not bleeding edge, though. It is more then three years since it was released. What I am trying to do is to identify areas in the API where improvments can be done. Then, of course, it is up to the maintainers to decide what to do. Mayb

Re: Return values from MARC::Record

2003-11-07 Thread Paul Hoffman
On Friday, November 7, 2003, at 02:07 AM, Leif Andersson wrote: At the top of MARC::Record we add: use Want; This would introduce a dependency on Perl 5.6, which Want requires. MARC::Record currently only requires 5.5, as far as I can tell. Paul. -- Paul Hoffman :: Taubman Medical Library ::

Re: Return values from MARC::Record

2003-11-07 Thread Paul Hoffman
On Friday, November 7, 2003, at 08:23 AM, Paul Hoffman wrote: On Thursday, November 6, 2003, at 08:45 PM, Leif Andersson wrote: Assume we have a record with two 035 fields 035 -- $91234567 035 -- $a(XX)12345678 Now, this code will get the 035 $9 subfield: $subfield = eval { $record->field('035

Re: Return values from MARC::Record

2003-11-07 Thread Paul Hoffman
On Thursday, November 6, 2003, at 08:45 PM, Leif Andersson wrote: Assume we have a record with two 035 fields 035 -- $91234567 035 -- $a(XX)12345678 Now, this code will get the 035 $9 subfield: $subfield = eval { $record->field('035')->subfield('9') }; @subfields = eval { $record->field('035')->

Re: Return values from MARC::Record

2003-11-07 Thread Leif Andersson
I did some research. It is possible to do this. Some people may consider the resulting code a bit bizarre, I am sure. But it is do-able. Using the Want.pm module we can gather information about several different contexts in which the code is executing. We add a flag to the MARC::Record object t