App-Chart
view release on metacpan or search on metacpan
lib/App/Chart/Glib/Ex/MoreUtils.pm view on Meta::CPAN
# returns either 'deutsch' or 'english'
The user's preferred language is taken from C<Glib::get_language_names> (see
L<Glib::Utils>). If none of the given C<$lang> values are among the user's
preferences then the first in the call is used as the default and its
C<$value> returned.
This is meant for selecting semi-technical things from a fixed set of
possibilities within the program code, for example different URLs for the
English or German version of some web page which will be parsed. If it was
in a F<.mo> file (per C<Locale::TextDomain>) the choice would be locked down
by the translator, but C<lang_select> allows a user preference.
=back
=head1 SEE ALSO
L<Glib::Utils>
=cut
lib/App/Chart/Glib/Ex/SignalBlock.pm view on Meta::CPAN
instead use
{
my $blocker = App::Chart::Glib::Ex::SignalBlock->new ($obj,$id);
...
# automatic signal_handler_unblock when $blocker out of scope
}
SignalBlock holds weak references to the target objects, so the mere fact a
signal is blocked won't an object alive once nothing else cares if it lives
or dies.
=back
=head1 OTHER NOTES
When there's multiple signals in a SignalBlock it's currently unspecified
what order the unblock calls are made. (What would be good? First-in
first-out, or a stack?) You can create multiple SignalBlock objects and
arrange your blocks to destroyed them in a particular order if it matters.
( run in 0.510 second using v1.01-cache-2.11-cpan-49f99fa48dc )