links - perl [links - soft] [links] [home] [search

Perl is like Russia - mess, lot of unclear artifacts and you never know what will happen until you try it.
Misha Verbitsky.





to use constant in regexps and here prints, use ${\<CONSTANT NAME>}, for example:
use constant YOYO => 'yoyo';
'yoyodune' ~= /${\YOYO} /ox;

print <<EOF
YOYO has value ${\YOYO}
EOF
;

If getting unused variable 'Perl___notused' warnings when compiling perl C/C++ module, add
#undef dNOOP
#define dNOOP extern int __attribute__ ((unused)) Perl___notused PERL_UNUSED_DECL
to the corresponding .xs file. Alternatively, fix the corresponding line in CORE/perl.h (it seems that __attribute__ ((unused)) is missing there) (observed with perl 5.10.0 and gcc 4.2.2).
A warning deprecated conversion from string constant to 'char*' when compiling perl C++ module is caused by char* file = __FILE__; emiited by xsubpp into the C++ code. To cure this, modify in lib/ExtUtils/ParseXS.pm the line
#    char* file = __FILE__;
by
#    const char* file = __FILE__;
(observed with perl 5.8.8 and 5.10.0)

created Mar 24 2006
last updated Thu Sep 4 18:58:48 GMT 2008