Main > Programming > Libraries >

Want 0.14

Want 0.14

Sponsored Links

Want 0.14 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 2 (1 times)
File size: 0.017 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 902
Date added: 2007-05-05
Publisher: Robin Houston

Want 0.14 description

Want is a Perl module created to implement the `want command.

SYNOPSIS

use Want;
sub foo :lvalue {
if (want(qwLVALUE ASSIGN)) {
print "We have been assigned ", want(ASSIGN);
lnoreturn;
}
elsif (want(LIST)) {
rreturn (1, 2, 3);
}
elsif (want(BOOL)) {
rreturn 0;
}
elsif (want(qwSCALAR !REF)) {
rreturn 23;
}
elsif (want(HASH)) {
rreturn { foo => 17, bar => 23 };
}
return
}

This module generalises the mechanism of the wantarray function, allowing a function to determine in some detail how its return value is going to be immediately used.

...

EXAMPLES

use Carp croak;
use Want howmany;
sub numbers {
my $count = howmany();
croak("Cant make an infinite list") if !defined($count);
return (1..$count);
}
my ($one, $two, $three) = numbers();


use Want want;
sub pi () {
if (want(ARRAY)) {
return [3, 1, 4, 1, 5, 9];
}
elsif (want(LIST)) {
return (3, 1, 4, 1, 5, 9);
}
else {
return 3;
}
}
print pi->[2]; # prints 4
print ((pi)[3]); # prints 1


sub backstr :lvalue {
if (want(qwLVALUE ASSIGN)) {
my ($a) = want(ASSIGN);
$_[0] = reverse $a;
return undef;
}
elsif (want(RVALUE)) {
my $t = scalar reverse $_[0];
}
else {
carp("Not in ASSIGN context");
}
return
}

print "foo -> ", backstr("foo"), "n"; # foo -> oof
backstr(my $robin) = "nibor";
print "$robin is now $robinn"; # $robin is now robin

Want 0.14 Screenshot

Advertisements

Want 0.14 Keywords

Bookmark Want 0.14

Hyperlink code:
Link for forum:

Want 0.14 Copyright

WareSeeker periodically updates pricing and software information of Want 0.14 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Want 0.14 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
PLJava is Perl module that will embed Perl into Java. Free Download
Devel::Hints is a Perl module created to access compile-time hints at runtime. Free Download
EasyTool is the library of Perl Functions in Common Usage. Free Download
JDBC is a Perl 5 interface to Java JDBC (via Inline::Java). Free Download
Text::WagnerFischer is an implementation of the Wagner-Fischer edit distance. Free Download
Inline-API is a Perl module that teach you how to bind a programming language to Perl using Inline.pm. Free Download
foundation Perl module inheritance without objects. Free Download
App::Manager is a Perl module for installing, managing and uninstalling software packages. Free Download