Perl module ideas #2

About the Perl Module Ideas posting series. Previous posts: #1.

* Archive::Manager (or Archive::Writer) using libarchive. There is now already Archive::Extract::Libarchive but a generic interface for writing would be nice too.

* Something to replace Log::Log4perl for my Log::Any::App (or Log::Any in general, so maybe I'll end up with a Log::Any::Adapter::Something). Log4perl is nice and all, but its startup is a bit slow. I don't need all its features. All I need to do is combine the various Log::Dispatch modules and give them categories. I know, there are already too many log modules on CPAN, so I'll look at them first before reinventing the wheel.

* A front-end (or tutorial, or something) for Marpa. Being a parser newbie, I always end up with Regexp::Grammars as that's the easier one to use.

* (Continuing idea on previous post) A generic framework for App::perlmv and App::perlmp3tag and other similar application. Or even, a generic framework for application that works on a tree (not just directory tree).

* A DateTime::Format module to parse natural dates/times that is easy to translate. Currently DateTime::Format::Natural is English-only and hard to translate.

4 Comments

I really like Log::Any, but last I looked the available adapters were all lacking in one way or another. I built my own and am rather pleased with it, except that the application has grown and now forks and continues to write to the logs and, well... yeah. (I hacked out a work-around, but I really want to fix it proper)

Log::Agent looks interesting, but I haven't tried it and I'm not sure if it suits my preferences.

Log::Dispatch is certainly my favorite out-of-the-box, though I've been meaning to spend some quality time with Log::Contextual since that looks similar in some ways.

I guess it's just a matter of building up my wish-list on needs in a logger, and then surveying how to do it with each of the main contenders - then wrap the best up with a simplified API that suits my aesthetic preference :)

(that preference being: logging should be so damned easy and lightweight that your programmers should have
*no* excuse to not use it.)

I guess that's why I chose Log::Any for that last project - I built up a simple, straight-forward interface that was bone-easy to use and configure, and was planning on being able to just transparently swap in a better adapter when it became necessary. Sadly, I never got the chance :)

@Hercynium: There is Log::Any::Adapter::Dispatch, which lets you log using the various Log::Dispatch modules. There are *a lot* of them. (What's left is supporting categories).

I've thought about some sort of interface to libarchive for writing archives, but I haven't needed one yet. The libarchive API is quite large, so a higher-level simple tar/zip with various compression algorithms would be a good start.

Leave a comment

About Steven Haryanto

user-pic A programmer (mostly Perl 5 nowadays).