I get the following errors/warnings if I run ScanSwitch.pl or SwitchMap.pl or FindOffice.pl
The problem seems to be in Constants.pm but I do not know wehre or what is the Problem.
Subroutine Cwd::bootstrap redefined at C:/Perl/lib/DynaLoader.pm line 207.
Subroutine Cwd::CLONE redefined at C:/Perl/lib/DynaLoader.pm line 214.
Subroutine Cwd::fastcwd redefined at C:/Perl/lib/DynaLoader.pm line 214.
Subroutine Cwd::getcwd redefined at C:/Perl/lib/DynaLoader.pm line 214.
Subroutine Cwd::abs_path redefined at C:/Perl/lib/DynaLoader.pm line 214.
Subroutine Cwd::getdcwd redefined at C:/Perl/lib/DynaLoader.pm line 214.
Subroutine File::Spec::Unix::canonpath redefined at C:/Perl/lib/DynaLoader.pm line 214.
Subroutine File::Spec::Unix::_fn_canonpath redefined at C:/Perl/lib/DynaLoader.pm line 214
Subroutine File::Spec::Unix::catdir redefined at C:/Perl/lib/DynaLoader.pm line 214.
Subroutine File::Spec::Unix::_fn_catdir redefined at C:/Perl/lib/DynaLoader.pm line 214.
Subroutine File::Spec::Unix::catfile redefined at C:/Perl/lib/DynaLoader.pm line 214.
Subroutine File::Spec::Unix::_fn_catfile redefined at C:/Perl/lib/DynaLoader.pm line 214.
I am running this on an Windows 208 R2 machine with AS Perl 5.16.3 also I had problems because FindBin do not give me the needed Directory.
It throws:
SwitchMap: Couldn't open D:\Programme\SIT\switchmap\D:\Programme\SIT\switchmap\CISCO-PRODUCTS-MIB.my for reading, Invalid argument
Where "D:\Programme\SIT\switchmap" should be the correct Value. I do not know why this happens, if I run only a simple Testscript, it works as I expect.
Test.pl
use FindBin qw($Bin);
print "Bin: $Bin\n";
As an short workaround I added the new Line "$Bin =~ s/\/.*//;" after "use FindBin qw($Bin);" in Constants.pm.
But explicit for FindOffice.pl where the Webserver shows those redefined errors I need some solution. Maybe it is an simple misconfiguration in my Environment...
Christian Krausse
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I get the following errors/warnings if I run ScanSwitch.pl or SwitchMap.pl or FindOffice.pl
The problem seems to be in Constants.pm but I do not know wehre or what is the Problem.
I am running this on an Windows 208 R2 machine with AS Perl 5.16.3 also I had problems because FindBin do not give me the needed Directory.
It throws:
SwitchMap: Couldn't open D:\Programme\SIT\switchmap\D:\Programme\SIT\switchmap\CISCO-PRODUCTS-MIB.my for reading, Invalid argument
Where "D:\Programme\SIT\switchmap" should be the correct Value. I do not know why this happens, if I run only a simple Testscript, it works as I expect.
Test.pl
use FindBin qw($Bin);
print "Bin: $Bin\n";
As an short workaround I added the new Line "$Bin =~ s/\/.*//;" after "use FindBin qw($Bin);" in Constants.pm.
But explicit for FindOffice.pl where the Webserver shows those redefined errors I need some solution. Maybe it is an simple misconfiguration in my Environment...
Christian Krausse
Christian,
I'm sorry it took so long to respond, I lost your message in my mail queues.
I think it's best to override $Bin explicitly, rather than doing a substitution. In other words, rather than
$Bin =~ s/\/.*//
maybe
$Bin = "D:\Programme\SIT\switchmap";
Does that help?