NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
libunique (Score:1)
Why is the module Gtk2::Unique? Shouldn't the libunique work for all app types even if not using Gtk2? I don't write Gtk2 applications but it will be interesting to have a common easy way how to make sure scripts are running just once. Like cron jobs, etc. Is this possible with libunique and/or Gtk2::Unique?
Re: (Score:1)
Because libunique requires gtk+.
Re: (Score:1)
The module is in the prefix Gtk2 because that's was suggested in the perl-gtk IRC channel. The name was even proposed by the creator of libunique.
Nevertheless, the namespace is not a sign of the dependencies required but more of where the module belongs to. Although this particular module does require that an application is given a Gtk2::Window handle. I haven't looked at the C library so I don't really know why this is needed. I will ask the creator of the C library why is a Gtk2::Window handle required.
Re:libunique dependencies (Score:1)
I got a reply from libunique's creator. The purpose of the library is truly to help GUI based programs to ensure an unique instance. Since it is aimed at GUIs the default implementation of libunique provides some custom actions that apply only to a GUI (ex: bring forwards the main window of the application when a message is received).
A command line application that would like to have the same benefits could either use D-Bus and try to register a service name. Service names are unique in D-Bus. Another appro