Acme::please - intercal-compliant politesse


Acme-please documentation  | view source Contained in the Acme-please distribution.

Index


NAME

Top

Acme::please - intercal-compliant politesse

SYNOPSIS

Top

  use Acme::please;
  print "will you$please sit down?\n" for 1..10; # two and a half pleases
  tie $plz => Acme::please, pctg => 70;
  print "will you$plz sit down?\n" for 1..10; # expect seven pleases
  tie $plait => Acme::please, please => " s'il vous plait";
  print "will you sit down$plait?\n" for 1..10; # expect 2.5 pleases in French

DESCRIPTION

Top

A tie interface for creating scalar variables that have a percentage chance of having either a predetermined value or they are empty strings when evaluated. The tie interface takes two named arguments, pctg and please.

pctg

pctg, which is short for "percentage", will be compared with rand(100) and the null string will be returned if the random number is larger. The efault value is 25.

please

please, named in honor of the legendary "politesse" compilation requirement of Intercal, is the string which will be returned when the random number is not larger. The default value is ' please' and it is reccommended that the practice of using a leading blank space be adhered to for readability, following the examples above.

EXPORT

$please is exported into caller's package through the mechanism of tieing ${caller().'::please'}. This can be suppressed by using Acme::please with an empty list:

  use Acme::please ();	# if you don't need please in your package




HISTORY

Top

0.01

Original version

AUTHOR

Top

David Nicol, <davidnico@cpan.org>


Acme-please documentation  | view source Contained in the Acme-please distribution.