Re: Pango perl bindings



On 27/03/2008, Torsten Schoenfeld <kaffeetisch gmx de> wrote:
Saying "use Gtk2;" will still need to pull in the pango stuff -- this
can be accomplished by making Gtk2 depend on the new pango module.

that sounds like the right way to do it.

 Also, Gtk2 currently makes the pango stuff available under the namespace
 Gtk2::Pango, and that will have to continue to be the case.
 Unfortunately, Gtk2 also provides a Gtk2/Pango.pm file for some
 constants.  So the new pango module can't just use the Gtk2::Pango
 namespace -- "use Gtk2::Pango;" still has to pull in Gtk2's
 Gtk2/Pango.pm.  So I think the new pango module should just use the
 namespace "Pango".  Gtk2 would then need to map Pango::* to
 Gtk2::Pango::*.  How could this be done?

This is rather trivial, something like this would do:

require Pango;
no strict 'refs';
*{"Gtk2::Pango::".$_} = *{"Pango".$_}
for keys %Pango::

Cheers,
CLK



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]