

Higher-Order Perl is available for free as a PDF - henning
http://hop.perl.plover.com/book/

======
scelerat
I read this book several years ago when I was still doing a lot of straight-
ahead PHP. Was a bit of a mind opener at the time and totally changed my
approach and understanding of programming and programming languages. Much of
the book is applicable to Javascript, Ruby, and Python. I don't have much use
for Perl now, but it's still a great read.

~~~
ratsbane
I also read it several years ago too and I frequently pick it up and re-read
bits. It's changed my programming style for the better, not just Perl, but
related languages. MJD, wherever you are, good work.

------
aaronsw
Has anyone seen mjd lately? I haven't heard from him and he hasn't updated his
blog since January. I'm starting to get worried. (This PDF was put up long
before that.)

~~~
rmk
Last I checked, mjd appeared to be out of a job, and was soliciting donations
for his (awesome) higher-order perl book. It's a shame he's out of a job,
because if mjd cannot get a job, what about the rest of us?

~~~
mst
He's working with rjbs over at pobox.com now. I've seen him in #dbix-class
swearing at my code a few times.

We tried to get him to YAPC::NA but he has this thing called a family that
apparently sometimes intervenes with his ability to gallivant across the
country, so I had to get Damian to heckle my "I wanted to be MJD when I grew
up" joke instead.

~~~
telemachos
>> _I've seen him in #dbix-class swearing at my code a few times._

That sounds about right:
[http://groups.google.com/group/comp.lang.perl.misc/msg/b2f91...](http://groups.google.com/group/comp.lang.perl.misc/msg/b2f911d6d9c5cef2?pli=1)

(Note: I used to have a little program to pick one of these out at random and
insert it as a signature for Mutt, but I seem to have lost it. I got some
great replies based on some of those.)

 _Edit_ \- better link - thanks mjd

------
zby
It was really mind-boggling when reading it - but then I did not have much
chance to apply the techniques in my work. I've read a lot of positive reviews
of this book and how it changed the way people programm - but what was exactly
the technique that you picked up from it?

I once copied the crawler using iterators (
<http://hop.perl.plover.com/Examples/ALL/ItRobot10.pl> ) when we needed a
quick script to check our links - and it worked nice for about a 1000 entries
and then it suddenly started to be really slow. I tried to find out where that
slow down happens and it was after the return statement in traverse - it seems
like this code triggers some garbage collector problem. I did not have time to
analyze that further - but it happened both in 5.10.1 and 5.12.1.

I've also send a simple bug report to mjd (for the line 'my $html = get($url);
- it redeclares $html and so the value becomes invisible from outside of the
loop and in particular for the return statement), but I never got any answer
from him.

~~~
mjd
I'm sorry that I didn't get your error report, or that you didn't get my reply
to your error report. But I maintain an errata page, and that error has been
on it since 2005-05-24. See
<http://hop.perl.plover.com/errata/errata-p-1.html#p196>.

------
elblanco
The regex as a value generator in this book is really quite good. I've been
dying to see somebody write it up and stick it on CPAN.

~~~
JadeNB
It's been a while since I read the book, and I don't remember this use of
regexes; but is it by chance covered under Ovid's HOP::Parser module
(<http://search.cpan.org/~ovid/HOP-Parser>), or another in that family
(<http://search.cpan.org/search?query=HOP>)?

~~~
elblanco
I've been looking for such a beast in the wild for quite some time. I've seen
a few on CPAN that'll take a regex (or some type of expression, or some
limited dialect of regex) and spit out a few random strings. Even Microsoft's
REX tool (<http://research.microsoft.com/en-us/projects/rex/>), which is the
best I've seen, gives nondeterministic random results.

Having a tool that would take a PCRE (or some subset of the language), apply
some constraints on repetition operators (like *->{0,2}, +->{1,2}) etc., spit
out a deterministic list of values (don't care how long so long as it's
reasonably finite) would be extremely powerful for software testing. Even the
rather limited capabilities in REX have helped me fix some invalid assumptions
I was making about valid inputs.

It's always seemed strange to me that regular expressions are described in the
literature as string generators, yet I've pretty much only ever seen them used
as string acceptors in practice in the form of a predicate (s in set
<REGEX>?).

------
danbmil99
can't we just let Perl fade gently into that good night? I mean really. Time's
up.

