On Tue, Oct 21, 2003 at 06:21:31PM +0200, paul POULAIN wrote:
> other question : how works ->warnings ?
> I tried $marcrecord->warnings(), but I only get a number.

how about in list context?

    @warnings = $record->warnings(); 

This should have been more clear in the docs (which are now updated...in cvs).

The reason why warnings() returns a list is that a given record could have 
multiple warnings. When you assign to a scalar in list context you get the 
amount of items in the list, which is why you got a number.

It can be a handy trick sometimes:

    my $count = @items; ## number of items in @items

//Ed

Reply via email to