Re: RFC version issues
- From: "A. Pagaltzis" <pagaltzis gmx de>
- To: Gtk-Perl-List <gtk-perl-list gnome org>
- Subject: Re: RFC version issues
- Date: Fri, 23 Jan 2004 16:40:46 +0100
* Ross McFarland <rwmcfa1 neces com> [2004-01-23 05:18]:
2) add two new functions, for example check_bound_version and
get_bound_version_info. these would return the versions Gtk2
was compiled against and therefore what is available to the
app.
Sounds like the only logical option.
optionally warning messages could be printed saying not to use
check_version and get_version_info b/c they're almost useless.
(they could be useful if you're trying to work around bugs in
gtk+ so this probably isn't a good idea)
How about using warnings::register and putting these messages
into warnings::warnif()? That way I could say
no warnings 'gtk2-useless';
# or
no warnings 'gtk2-deprecated';
# or even (to get the typical console messages to shut up)
no warnings 'gtk2-assert';
An obvious advantage is that using pragma gets us lexical scoping
for the warnings at no extra cost:
if(
do {
no warnings 'gtk2-useless';
Gtk2->get_version_info;
} == 222
) {
# work around some bug
}
else {
# just do it normally
}
--
Regards,
Aristotle
"If you can't laugh at yourself, you don't take life seriously enough."
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]