Object::eBay::Boolean

Object::eBay::Boolean is a Perl module that represents a boolean return value.
Download

Object::eBay::Boolean Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Michael Hendricks
  • Publisher web site:
  • http://search.cpan.org/~mndrix/Object-eBay-0.0.3/lib/Object/eBay/Boolean.pm

Object::eBay::Boolean Tags


Object::eBay::Boolean Description

Object::eBay::Boolean is a Perl module that represents a boolean return value. Object::eBay::Boolean is a Perl module that represents a boolean return value.SYNOPSIS # assuming that $item is an Object::eBay::Item object my $private = $item->seller->feedback_private(); # In string context, yields 'true' or 'false' print "Is the feedback private? $privaten"; # In boolean context, yields 1 or 0 if ($private) { print "Feedback is privaten"; } else { print "Feedback is publicn"; }Many of eBay's API calls return boolean (true/false) values. An Object::eBay::Boolean object represents this boolean return value in a context-aware way. In boolean context, the value is simply a boolean value as expected. In string context, the value is eBay's literal 'true' or 'false' value.METHODSas_booleanThis method implements the boolean context. Namely if ( $x->as_boolean() ) { ... }is the same as if ($x) { ... }as_stringThis method implements the string context. Namely print "Example: " . $x->as_string() . "n";is the same as print "Example: $xn"; Requirements: · Perl


Object::eBay::Boolean Related Software