Re: overridding the theme in ~.gtkrc-2.0
- From: muppet <scott asofyet org>
- To: Dave Howorth <dhoworth mrc-lmb cam ac uk>
- Cc: gtk-perl-list gnome org
- Subject: Re: overridding the theme in ~.gtkrc-2.0
- Date: Fri, 24 Aug 2007 20:27:39 -0400
On Aug 24, 2007, at 8:18 AM, Dave Howorth wrote:
Sergei Steshenko wrote:
Another trick in Perl - if one wants to control the order in which
'use ...'
statements are executed, 'eval' comes handy, i.e. one can write:
<something_to_be_done_first>
eval "use Foo;";
No need for BEGIN blocks or tricks:
require Foo;
Foo->import; # if necessary
Or, much more simply:
use Gtk2;
$ENV{...} = ...;
Gtk2->init;
Which, incidentally, is the same trick you use when you have an
optional graphical user interface:
use Gtk2;
if (Gtk2->init_check) {
create_and_run_gui ();
} else {
create_and_run_curses_ui ();
}
--
Doing a good job around here is like wetting your pants in a dark
suit; you get a warm feeling, but no one notices.
-- unknown
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]