Perl and Parsing 9: "Use" and the Ruby Slippers
Perl 5 parses its
use
statement.
The use
statement
is implemented with
what I have named
"Ruby Slippers" parsing.
The idea is that you parse with a convenient grammar,
but one which is too simple to actually describe the language
you are parsing.
For example, if you are parsing HTML, the grammar might assume
all start tags have end tags.
Whenever the simplified grammar has trouble parsing, t…