* david nicol <[EMAIL PROTECTED]> [2004-01-13 13:56]:
> Acme::please is for randomly inserting " please" into your
> output via a tied scalar.  The string and printing percentage
> are both configurable (see the documentation.)

It would be nice if there were a way to correlate two instances
of the variable. Along the lines of your example, I might do
something like

  print "would you$please shut the door$please?";

but in your current version there's a chance that this might
print " please" twice, which would be undesired. You could also
have an array which would makes sure that once a "please" was
printed for a certain index, it won't ever happen again. Then the
above example would read

  print "would you$please[1] shut the door$please[1]?";

and there'd be no chance I'd ever get "would you please shut the
door please?".

Of course there are also cases where you'd want more text than
just the please to dis-/appear depending on its presence, but
they we're zeroing in to something close to a fullblown
templating system, and we wouldn't want another one of those on
CPAN.. :-)

-- 
Regards,
Aristotle
 
"If you can't laugh at yourself, you don't take life seriously enough."

Reply via email to