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

NAME

Scalar::Andand - Guarded method invocation.

VERSION

Version 0.04

SYNOPSIS

Scalar::andand lets us write:

 $phone = Location->find('first', name => 'Johnson' )->andand->phone

And get a guarded method invocation or safe navigation method. This snippet performs a find on the Location class, then calls phone to the result if the result is defined. If the result is not defined, then the expression returns false without throwing an exception.

EXPORT

This module doesn't export anything to your namespace, but it does add a universal method andand, which is a far graver sin.

AUTHOR

Leon Timmermans, <leont at cpan.org>

BUGS

You have to include the module in every package where you use the magic andand method, or else it doesn't work on undefined values.

This module contains more magic than what is responsible, don't be surprised by weird bugs.

Please report any bugs or feature requests to bug-scalar-andand at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Scalar-Andand. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Scalar::Andand

You can also look for information at:

COPYRIGHT & LICENSE

Copyright 2009 Leon Timmermans, all rights reserved.

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