Re: Every.pm on CPAN
by Eric Wilhelm other posts by this author
Jul 18 2008 4:40PM messages near this date
Re: Every.pm on CPAN
|
Re: Every.pm on CPAN
# from Ted Zlatanov
# on Friday 18 July 2008 06:26:
> 2) there's a way to know not just the line, but also the character
> position of a function call, so we can do
>
> if (every(5) || every(6)) {}
>
> without resorting to shenanigans like using \5 and \6 or passing a
> special identifier in addition to the number.
It looks like the every(6) would miss a count whenever every(5) was
true -- would that be intentional? Or did you mean '|' instead
of '||' ?
In any case, how does the calling character position matter if you're
keying by divisor and caller()? if(every(5) | every(5)) ?
Provide a closure for more advanced usages?
my $fives = Every-> new(5);
... if($fives-> ());
--Eric
--
Moving pianos is dangerous.
Moving pianos are dangerous.
Buffalo buffalo buffalo buffalo buffalo buffalo buffalo.
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
Thread:
Ted Zlatanov
Abigail
Ted Zlatanov
Ben Morrow
Roland Giersig
David Nicol
Ted Zlatanov
Ted Zlatanov
David Nicol
Ben Morrow
Ted Zlatanov
Chromatic
Aristotle Pagaltzis
Nicholas Clark
Yitzchak Scott-Thoennes
David Nicol
Ted Zlatanov
Abigail
Ted Zlatanov
Abigail
David Nicol
Ted Zlatanov
Aristotle Pagaltzis
Ted Zlatanov
David Cantrell
David Nicol
Eric Wilhelm
David Nicol
Ben Morrow
Aristotle Pagaltzis
Paul Johnson
David Nicol
Eric Brine
Gisle Aas
David Nicol
Nicholas Clark
|