Package: wnpp
Severity: wishlist
Owner: Jonas Smedegaard <d...@jones.dk>

* Package name    : libperlx-maybe-perl
  Version         : 0.002
  Upstream Author : Toby Inkster <toby...@cpan.org>
* URL             : http://search.cpan.org/dist/PerlX-Maybe/
* License         : Artistic or GPL-1+
  Programming Lang: Perl
  Description     : return a pair only if they are both defined

 Moose classes (and some other classes) distinguish between an attribute
 being unset and the attribute being set to undef. Supplying a
 constructor arguments like this:
 .
     my $bob = Person->new(
        name => $name,
        age => $age,
        );
 .
 Will result in the "name" and "age" attributes possibly being set to
 undef (if the corresponding $name and $age variables are not defined),
 which may violate the Person class' type constraints.
 .
 PerlX::Maybe checks that $x and $y are both defined. If they are, it
 returns them both as a list; otherwise it returns the empty list.



-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20120605225830.13135.44065.report...@auryn.jones.dk

Reply via email to