Torsten Schönfeld:

> I currently attempt this with the following code:
>
>   BEGIN { require Gtk3; }
>   my $success = eval { Gtk3->import; 1 };
>   BAIL_OUT ("Cannot load Gtk3: $@")
>     unless $success;

You could move the require into the eval block instead, e.g.:

my $success = eval { require Gtk3; Gtk3->import; 1 };
BAIL_OUT ("Cannot load Gtk3: $@")
  unless $success;

Hope that helps,
Alex

Reply via email to