The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

LINQ::FieldSet::Single - similar to LINQ::FieldSet::Selection, but only selects one field

DESCRIPTION

LINQ::FieldSet::Single is a subclass of LINQ::FieldSet.

This is used internally by LINQ and you probably don't need to know about it unless you're writing very specific extensions for LINQ. The end user interface is the field function in LINQ::Util.

CONSTRUCTOR

new( NAME, EXTRAARGS )

Constructs a fieldset like:

  'LINQ::FieldSet::Single'->new( 'name', @stuff );

If called in scalar context, and @stuff isn't the empty list, then will throw an exception.

If called in list context, will return the newly constructed object followed by unadulterated @stuff.

METHODS

coderef

Gets a coderef for this assertion; the coderef operates on $_.

to_string

Basic string representation of the fieldset.

OVERLOADING

This class overloads "" to call the to_string method and &{} to call the coderef method.

BUGS

Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=LINQ.

SEE ALSO

LINQ::FieldSet, LINQ::Util.

AUTHOR

Toby Inkster <tobyink@cpan.org>.

COPYRIGHT AND LICENCE

This software is copyright (c) 2021 by Toby Inkster.

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

DISCLAIMER OF WARRANTIES

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.