I attended an exhibit about the work of Leonardo da Vinci several months ago. Part of that exhibit was a thorough analysis of his Mona Lisa painting. "It's perhaps the most famous painting in the world," I thought. "I've seen it (or at least replicas) thousands of times before."
Then at the suggestion of the exhibit, I looked behind the model and saw more details, such as a low wall, the lack of eyebrows and eyelashes, and other small details that have always been there but somehow failed to catch my attention.
Several years ago, I read an analysis of Roger Zelazny's The Chronicles of Amber series. The analyst admitted that he re-read the series every few years and learned new things each time. (Zelazny's Chandleresque tone in the first five books contributes to the depth of the books, but so does the fact that his characters gladly lie to, backstab, betray, confuse, manipulate, and distrust each other and their own selves.) A reinterpretation of a single line which seemed so innocent during the last reading could cause you to see a character in an entirely different light.
Good art is like that.
Today I understood an underused feature of Perl 5 better.
Paulo Custodio filed a bug on the Modern Perl draft that the explanation of module unimporting was incomplete. I had written that:
no Module::Name qw( arguments );
... is equivalent to:
BEGIN { Module::Name->unimport( qw( arguments ) ) }
In all accuracy (and, upon reflection, obviousness), no Module::Name qw( arguments )
is equivalent to:
BEGIN
{
require 'Module::Name';
Module::Name->unimport( qw( arguments ) );
}
Even though I rarely use module unimporting and have never, to my best
recollection, unimported a module I haven't previously use
d, its
obvious that unimporting through no
should imply
require
. (I have trouble imagining an interface where you'd initially load a pragma with no
, unless you use strictperl, but clever people can do clever things.)
You may all now chuckle at how long it took me to realize this (and, yes, I did read the Perl 5 source code to prove to myself that this occurs).
Three modules which use this kind of interface (presumably for the legibility of "no x;" over "use no::x";) are overloading (which is in 5.12), indirect, and Leading::Zeros. I don't know who started the trend but I could easily believe that it was any one of Yuval, Vincent, or Damian!
Right! I thought I'd seen something like that somewhere. A moment's reflection reveals that the first culprit I noticed was autovivification.
Nitpick: Module::Name must be a bareword (not a string) for the :: to be interpreted correctly:
Example: Given