Re: Gtk2::GLExt build problems
- From: "A. Pagaltzis" <pagaltzis gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: Gtk2::GLExt build problems
- Date: Sat, 3 Jun 2006 11:06:45 +0200
* muppet <scott asofyet org> [2006-06-03 00:50]:
Does anybody know offhand a decent way to define a constant if
it's not already defined?
Probably not without some `Devel::` module. Try this:
perl -e'print ref \&foo; \&foo->()'
So `\&foo` is valid even before `foo` is defined (or indeed
declared), which means you need something that will peek at
flags in structs deep in the bowels of perl in order to answer
your question.
* Mark Glines <mark glines org> [2006-06-03 08:05]:
I don't know how to specify a prototype with "use constant", or
indeed if its possible at all. But replacing the constants with
the following lines doesn't emit any warnings for me:
It isnât, but the subs in SDL::OpenGL::Constants should have the
right prototype (ie. `()`, same as constant.pm uses) in the first
place. Flick a bug report to the author.
Regards,
--
#Aristotle
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]