Robin Houston wrote:
> Lingua::Romana::Perligata   :-)
> 
> I don't know when the module was actually released onto CPAN,
> but I saw it for the first time at the weekend. It is ...
> staggering ...
> 
> Anyone written any programs using it?

Yes. I converted a little script I have that puts some stuff into a database
to use LRP.

The two main snags I came across were its abysmal string handling
(basically, none at all) and the fact that word endings are a liability in
bareword or quoted context.

The first problem is probably caused by the second; the "official" way to
quote things is to use "inquementum" -- but if the thing you're trying to
quote has a "magic" ending for LRP (such as -i -ementum -e etc.), you'll run
into problems. And things that aren't made up of letters are also difficult
to get into strings.

I ended up making subrouting called "wordere" that takes a list of numbers
and returns a string composed of characters with those code points. Of
course, pack('C*') wouldn't work, since I couldn't produce the string 'C*'
to feed to pack (chicken and egg problem), so I used join '', map { chr $_
}, @_. And I got '' by assigning "lacunam" (space, i.e. ' ') to a variable
and chop()ing it. Slightly ick. Now my string assignments ended up being
something like "da varo wordementum XLVII tum LIX tum XL tum CI tum LXXXIV
tum X" (pulling numbers out of a hat here, just for example).

And the other problem was with DBI->connect. Since DBI ends in I, LRP thinks
it's dative or something and didn't like it before the equivalent of ->
(apud? don't have the docs handy just now). However, before :: it took it.
So DBI->connect(...) ended up turning into DBI::connect('DBI', ...). More
ick. But at least it "works".

(And I also uncovered a bug in the version I downloaded -- si 'if' doesn't
work, but nisi 'unless' does. After using "nisi non" all the time, I had a
look at the source; it seemed to me that "si" was being assigned the wrong
class. After giving it what "nisi" had, it seemed to work. But I didn't test
it extensively.)

And I miss time() and localtime() (though "$a = localtime" can be translated
as something like "da ao localtimeementum timeementum", but I consider that
cheating slightly).

Cheers,
Philip

Reply via email to