develooper Front page | perl.module-authors | Postings from October 2005

Naming a window manager scripting aid

A. Pagaltzis
October 7, 2005 15:21
Naming a window manager scripting aid
Message ID:
Hi all,

a while ago I wrote pekwm-menu[1], a script that builds various
kinds of menus for the pekwm window manager[2] dynamically
depending on the content of directories, the current XMMS
playlist and other external such sources.


Now I’ve been wondering about extracting the generic
functionality from the module and sticking it into a module.
There’s no reason this shouldn’t go on CPAN, so I’ve been musing
about the name.

The simplest option would be to take the route that some other
application-specific modules take – just use a toplevel
namespace. The Irssi::* modules are an example.

The better option, I think, would be to signify what this relates
to, which is a window manager. Now the common initialism for that
is “WM”, and indeed there is a bunch of stuff in the CPAN in

That would seem like a decent choice, but my conundrum is that
this module has absolutely nothing to do with X11. It just
contains helper functions for creating a text format that pekwm
understands as a menu definition. The modules already in X11::
and X11::WM:: expose some API provided by the window manager.
Pekwm has nothing of the sort; in fact using this module wouldn’t
even require pekwm at all. So putting this module under X11::
sounds really wrong.

The right place would be a namespace that categorise a module as
“(loosely) related to a particular application”, something like
AppSupport:: or Helper:: or what-might-you-have. But no such
thing exists, even though I think it might be worthwhile.

So what do I do?

*AUTOLOAD=*_=sub{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker; Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About