possible type at C:\Perl\lib\Win32\ODBC.pm 
Author Message
 possible type at C:\Perl\lib\Win32\ODBC.pm

Although my script runs, having -w on (which I do), produces the
following messages:

Name "Win32::ODBC::CacheConnection" used only once: possible type at
C:\Perl\lib\Win32/ODBC.pm line 30.
Name "ODBCPackage::Version" used only once: possible type at
C:\Perl\lib\Win32/ODBC.pm line 28.
Name "Win32::ODBC::CacheConnection" used only once: possible type at
C:\Perl\lib\Win32/ODBC.pm line 30.
Name "main::ODBC" used only once: possible type at
C:\Perl\lib\Win32/ODBC.pm line 29.

Now, I suspect there aren't really typos in ODBC.pm but I'm curious
about these warnings.  I don't like to ignore messages since they are
usually there for a reason.  What would cause this?

Henry



Tue, 30 May 2000 03:00:00 GMT  
 possible type at C:\Perl\lib\Win32\ODBC.pm

So as I copied them down, I introduced a typo in the error messages on
the word TYPO!  Sorry.

Henry

Quote:

> Although my script runs, having -w on (which I do), produces the
> following messages:

> Name "Win32::ODBC::CacheConnection" used only once: possible type at
> C:\Perl\lib\Win32/ODBC.pm line 30.
> Name "ODBCPackage::Version" used only once: possible type at
> C:\Perl\lib\Win32/ODBC.pm line 28.
> Name "Win32::ODBC::CacheConnection" used only once: possible type at
> C:\Perl\lib\Win32/ODBC.pm line 30.
> Name "main::ODBC" used only once: possible type at
> C:\Perl\lib\Win32/ODBC.pm line 29.

> Now, I suspect there aren't really typos in ODBC.pm but I'm curious
> about these warnings.  I don't like to ignore messages since they are
> usually there for a reason.  What would cause this?

> Henry



Tue, 30 May 2000 03:00:00 GMT  
 possible type at C:\Perl\lib\Win32\ODBC.pm

Quote:

> Although my script runs, having -w on (which I do), produces the
> following messages:

> Name "Win32::ODBC::CacheConnection" used only once: possible type at
> C:\Perl\lib\Win32/ODBC.pm line 30.
> Name "ODBCPackage::Version" used only once: possible type at
> C:\Perl\lib\Win32/ODBC.pm line 28.
> Name "Win32::ODBC::CacheConnection" used only once: possible type at
> C:\Perl\lib\Win32/ODBC.pm line 30.
> Name "main::ODBC" used only once: possible type at
> C:\Perl\lib\Win32/ODBC.pm line 29.

> Now, I suspect there aren't really typos in ODBC.pm but I'm curious
> about these warnings.  I don't like to ignore messages since they are
> usually there for a reason.  What would cause this?

> Henry

At the risk of sounding obvious, these messages mean exactly what they say!
For example, if you set a variable with

$variable = "wow";

but then never use $variable it is "used only once". Since you never use
$variable, Perl questions why you even set it. In your case, the variables
are in one of the standard packages, so don't sweat it - presumably the
package author has some reason for doing this (maybe future expansion). In
any case, it's unlikely this is an actual error so don't loose any sleep
over it!

Mark Reibert

-----------------------------
   Mark S. Reibert, Ph.D.

  Mystech Associates, Inc.
  3233 East Brookwood Court
   Phoenix, Arizona 85044

    Tel: (602) 732-3752
    Fax: (602) 706-5120

-----------------------------



Tue, 30 May 2000 03:00:00 GMT  
 possible type at C:\Perl\lib\Win32\ODBC.pm

Quote:

> Although my script runs, having -w on (which I do), produces the
> following messages:

> Name "Win32::ODBC::CacheConnection" used only once: possible type at
> C:\Perl\lib\Win32/ODBC.pm line 30.
> Name "ODBCPackage::Version" used only once: possible type at
> C:\Perl\lib\Win32/ODBC.pm line 28.
> Name "Win32::ODBC::CacheConnection" used only once: possible type at
> C:\Perl\lib\Win32/ODBC.pm line 30.
> Name "main::ODBC" used only once: possible type at
> C:\Perl\lib\Win32/ODBC.pm line 29.

> Now, I suspect there aren't really typos in ODBC.pm but I'm curious
> about these warnings.  I don't like to ignore messages since they are
> usually there for a reason.  What would cause this?

The author of ODBC.pm didn't use something like 'use vars' when writing
the module. You should probably send the author a patch to fix this. :-)
Thanks!

--
Tom Phoenix           http://www.teleport.com/~rootbeer/

Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



Tue, 30 May 2000 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Use of uninitialized value at D:\PERL5\lib/Win32/ODBC.pm

2. Possible improvement to /usr/local/lib/perl5/Carp.pm

3. Problems with Win32::ODBC (ODBC.pm)

4. How to make ODBC API calls with WIN32::0DBC (ODBC.PM)

5. Win32::ODBC Unitialized value at ODBC.pm line 261 NEWBIE

6. Win32::ODBC.pm hangs CGI.pm under Apache

7. Determining data types using Win32::ODBC

8. DBI::ODBC, Win32 Access97 and Data Types

9. [Fwd: unknown import: lib Calc at C:/Perl/lib/Math/BigInt.pm]

10. unknown import: lib Calc at C:/Perl/lib/Math/BigInt.pm

11. Missing \lib\i386-lib on ActiveWare build 306 of Perl for Win32

12. Problems with Win32 perl and odbc.pm

 

 
Powered by phpBB® Forum Software