Sign in to PrePAN



Somebody who uses perl...

GitHub: aaronpriven PAUSE ID: AARONRP URL:

User's Modules

List::Flat Another module to flatten an arrayref or list that may contain arrayrefs

I was unhappy with the several modules on CPAN I could find that do the relatively simple task of flattening a deep structure of array references into a single flat list, so I wrote another one.

Or rather, another two: one that handles circular references (flat) and one that doesn't (flatx). I suspect flatx is a terrible name but I couldn't think of one that wasn't something like "flat_unsafe" and that didn't encourage its use indiscriminately.

Thoughts welcome. Thanks.

aaronpriven@github 5 comments

English::Control Like, but with ${^OFS} instead of $OFS

So I had this idea that would be better if, instead of storing its variables in each package (potentially clobbering other variables if somebody has forgotten that, for example, $LIST_SEPARATOR or $WARNING or $NR are special), it would be better if it stored its variables as control-character variables, like ${^LIST_SEPARATOR} or ${^NR}. These are reserved to perl, normally, and are forced to be in package "main" so they only need to be set up once (not imported for each module).

Anyway, so I wrote this module to make that happen. (I say "wrote", but mostly what I did, other than typing {^ and } a lot, was delete a bunch of stuff.)


aaronpriven@github 4 comments