Erland Sommarskog
2008-04-28 22:29:45 UTC
I have this piece of code in my XS module:
if (sv = get_sv("Win32::SqlServer::Version", TRUE))
{
char buff[256];
sprintf_s(buff, 256,
"This is Win32::SqlServer, version %s\n\nCopyright (c)
2005-2008 Erland Sommarskog\n",
XS_VERSION);
sv_setnv(sv, atof(XS_VERSION));
sv_setpv(sv, buff);
SvNOK_on(sv);
}
In Perl 5.10 this yields:
Name "Win32::SqlServer::Version" used only once: possible typo at
F:/Perl/AS1002-AMD64/lib/DynaLoader.pm line 224.
Indeed, this variable is not referred elsewhere, but this did not happen in
Perl 5.8.
Is this an incidental or accidental change?
The workaround seems to be to add a reference in the PM module, although
I have not come around to try that yet. Or should I do the above in some
better way?
if (sv = get_sv("Win32::SqlServer::Version", TRUE))
{
char buff[256];
sprintf_s(buff, 256,
"This is Win32::SqlServer, version %s\n\nCopyright (c)
2005-2008 Erland Sommarskog\n",
XS_VERSION);
sv_setnv(sv, atof(XS_VERSION));
sv_setpv(sv, buff);
SvNOK_on(sv);
}
In Perl 5.10 this yields:
Name "Win32::SqlServer::Version" used only once: possible typo at
F:/Perl/AS1002-AMD64/lib/DynaLoader.pm line 224.
Indeed, this variable is not referred elsewhere, but this did not happen in
Perl 5.8.
Is this an incidental or accidental change?
The workaround seems to be to add a reference in the PM module, although
I have not come around to try that yet. Or should I do the above in some
better way?
--
Erland Sommarskog, Stockholm, ***@sommarskog.se
Erland Sommarskog, Stockholm, ***@sommarskog.se