[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[FWP] aCertainName.pm



Being the elitist a******s that we are, I thought I would ask for
contributions to, uh, aCertainName.pm. Well, in-house we are actually
going to call it a certain name for a while, until the joke wears off.
It's in honour of one of the most baroque coders we have known. It's
not me. Really. The idea is to reimplement as many Perl keywords as
possible in Perl--in the worst, most horrendous way. For instance,

sub substr { my($s,$o,$l) = @_; join '', (split '', $s)[$o..$o+$l-1]; }

I don't know if this is correct, BTW. What I am looking for, though,
is not just badness but madness, preferably with a method in it. I
want something which will bring back memories when I am old.

Another "project" I have in mind is overriding keywords with subs
that use regexes only. For instance, chop() is easy, a wrapper on
C<s/.$//>. substr could be derived from

   "(?:" . ("." x $offset) . ")(" . ("." x $len) . ")"

How much more can be done without using eval?

--
Tushar Samant
~
~
:wq


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe