Data-ResultSet

 view release on metacpan or  search on metacpan

lib/Data/ResultSet.pm  view on Meta::CPAN

provided names beginning with is_ will have the is_ stripped first.

The wrappers can be generated individually using other methods (see below).

=head2 make_wrappers_for_all ( @method_names )

Generates the C<all_> wrapper method for each provided name.

=head2 make_wrappers_for_has

Generates the C<has_> wrapper method for each provided name.

=head2 make_wrappers_for_get

Generates the C<get_> wrapper method for each provided name.

=head2 make_wrappers_for_get_not

Generates the C<get_not_> wrapper method for each provided name.

=head1 INSTANCE METHODS

=head2 add ( $object )

Adds an object to the result set.  Returns $self.

=head2 count ( )

Returns number of objects in the set.

=head2 contents ( )

Returns contents of set.

=head2 clear ( )

Clears contents of set.  Returns true.

=head2 all_METHOD ( )

Generated method that returns true if the METHOD called on every object
within the set returns true.

=head2 has_METHOD ( )

Generated method that returns true if one object within the set returns
true for METHOD.

=head2 get_METHOD ( )

Generated method that returns all objects for which METHOD returns true.

=head2 get_not_METHOD ( )

Generated method that returns all objects for which METHOD returns false.

=head1 INCOMPATIBILITIES

There are no known incompatibilities with this module.

=head1 BUGS AND LIMITATIONS

=over 4

=item *

The methods being wrapped shouldn't be anything more than simple
accessors.  They will get called an arbitrary number of times, so doing
any real work, particularly anything that changes state or has
side-effects, is a bad idea.

=back

Please report any new problems to the author.  Patches are welcome.

=head1 SEE ALSO

There are quite a few other packages on the CPAN for implementing
polymorphic return values.  You may wish to use one of these instead:

=over 4

=item * L<Class::ReturnValue>

=item * L<Return::Value>

=item * L<Contextual::Return>

=back

=head1 AUTHOR

Dave O'Neill

=head1 MAINTAINER

Dianne Skoll (dianne@skoll.ca)

=head1 LICENCE AND COPYRIGHT

Copyright (c) 2007 Roaring Penguin Software, Inc.
Copyright (c) 2022 Dianne Skoll

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.



( run in 2.511 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )