today | current | recent | random ... categories | search ... who ... syndication

Are you smoking crack, or something?

Where to start? On Sunday, I wrote a Perl class whose only role is to overload the "" operator so that it returns false and yet true, at the same time. Yesterday, I spent some time exchanging email on the subject of functions to munge input and return properly accented and encoded strings (e.g. Montreal becomes Montréal) This led to a brief and horrible tangent invoving Unicode which prompted me to comment that atleast with Unicode you get real smiley faces in the place of emoticons. Today, I started to write a Perl class whose only role is to overload "" so that a regular old string is both an object and a regular old string. This is a bit more interesting when you consider that the package also has ::CDATA and ::Encoded subclasses but more on that later. So my first thought when I saw an emoticon this afternoon? Write a class whose constructor accepts an emoticon and then overload its "" operator to return the equivalent Unicode character...

meta

 
The Connection talks to Bernard Kouchner, ←  → Me : ASCOPE::Class::Text.pm 1.0