The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Capture::Attribute::Return - the result of a "return" statement

DESCRIPTION

This is an Any::Moose class. Hopefully you'll never need to use it.

Constructor

new(%attributes)

Attributes

wasarray

Indicates whether the returned value was the result of a function call in "wantarray" mode or not. Either true, false or undef. See wantarray in perlfunc.

value

The return value, or if wasarray is true, then a reference to an array containing the list of returned values.

Methods

is_list, is_scalar, is_void

Slightly nicer than fiddling with checking the definedness and truthiness of wasarray.

Overloads

This class overloads array and scalar dereferencing.

BUGS

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

SEE ALSO

Capture::Attribute.

AUTHOR

Toby Inkster <tobyink@cpan.org>.

COPYRIGHT AND LICENCE

This software is copyright (c) 2012 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.