Re: Standalone Pango, take two






--- On Sun, 11/2/08, Torsten Schoenfeld <kaffeetisch gmx de> wrote:

From: Torsten Schoenfeld <kaffeetisch gmx de>
Subject: Standalone Pango, take two
To: gtk-perl-list gnome org
Cc: "Watson, Cory" <jheephat gmail com>, clkao clkao org
Date: Sunday, November 2, 2008, 7:39 AM

[snip]


â The yellow-wiring foreach loop in Gtk2.pm worries me a
bit:

  foreach my $key (keys %Pango::) {
    *{"Gtk2::Pango::" . $key} =
*{"Pango::" . $key};
  }

It automatically maps everything from Pango::* to
Gtk2::Pango::*.  This includes some stuff that probably
shouldn't be there, like BEGIN or bootstrap or
dl_load_flags or EXPORT*.  See the complete list:

  perl -MPango -le'map { print } keys %Pango::' |
sort

More importantly even, the loop will also automatically map
over any new API we add to Pango, thus indirectly changing
Gtk2's API.  Is it better to hardcode the stuff that
should be mapped over?

[snip]

-Torsten

I think the safest approach is to export/map _nothing_.

If one needs method/data, he/she should explicitly prefix it with
package name.

Regards,
  Sergei.







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