Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't locate wxPerl/Constructors/doc.pm in @INC

Status
Not open for further replies.

bedohave9

Programmer
Apr 19, 2012
8
0
0
US
I am getting an @INC error when I have tried to run my script with wxPerl::Constructors.
Here is the error below :
C:\Documents and Settings\sp\Desktop\Perl>cgdpframe.pl
Can't locate wxPerl/Constructors/doc.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at C:\Documents and Settings\sp\Desktop\Perl
\cgdpframe.pl line 9.
BEGIN failed--compilation aborted at C:\Documents and Settings\sp\Desktop\Perl\cgdpframe.pl line 9.


I have tried using the path where it is "actually installed"(I believe), then I have used the below path at use lib as below in the code :
use lib 'C:\Users\sp\AppData\Roaming\.cpanplus\5.16.1\build\wxPerl-Constructors-v0.0.4\lib\wxPerl';
Then the console threw the below error :
C:\Documents and Settings\sp\Desktop\Perl>winframe.pl
Can't locate wxPerl/Constructors/doc.pm in @INC (@INC contains: C:\Users\sp\AppData\Roaming\.cpanplus\5.16.1\build\wxPerl-Constructors-v0.0.
4\lib\wxPerl C:/Perl/site/lib C:/Perl/lib .) at C:\Documents and Settings\sp\Desktop\Perl\winframe.pl line 9.
BEGIN failed--compilation aborted at C:\Documents and Settings\sp\Desktop\Perl\winframe.pl line 9.


I have an Active Perl instance on my machine. Perviously, I used to have Strawberry Perl and Active Perl both, but then seeing the I am getting confused with both the perl distros. I have removed both of them and installed the new Active Perl on my machine, but could not able to remove the HKLM entries from the Registry Editor due to confusion of what to remove. I could able to install the Wx properly but this is happening when I have installed the wxPerl::Constructors.

The install log for the same as attached.

 
Unfortunately I'm unable to access your attachments; you need to upload them somewhere and then link to them in the attachment field (confusing I realise).

Meanwhile, I don't think you should be pointing to the CPAN build location for your module. If the CPAN build/installation succeeded it should have installed the module in an appopriate location in your Perl library directories. Try checking the build log yourself to see whether the location is mentioned, or try doing a search on your system for the .pm files.

Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
 
I have also tried doing the use lib with all the possible locations, but could not able to succeed successfully running the script.
The below are the logs.

Log for wxPerl::Constructors :

[MSG] [Mon Sep 24 15:47:24 2012] Trying to get 'ftp://ftp.cpan.org/pub/CPAN/authors/id/E/EW/EWILHELM/wxPerl-Constructors-v0.0.4.tar.gz'
[MSG] [Mon Sep 24 15:47:26 2012] Trying to get 'ftp://ftp.cpan.org/pub/CPAN/authors/id/E/EW/EWILHELM/CHECKSUMS'
[MSG] [Mon Sep 24 15:47:29 2012] Checksum matches for 'wxPerl-Constructors-v0.0.4.tar.gz'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/examples/'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/examples/wxconstruct.pl'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/lib/'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/lib/wxPerl/'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/lib/wxPerl/Constructors/'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/lib/wxPerl/Constructors/argmap.pod'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/lib/wxPerl/Constructors/argmap.pm'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/lib/wxPerl/Constructors/doc.pod'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/lib/wxPerl/Constructors.pm'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/META.yml'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/Changes'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/t/'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/t/00-load.t'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/t/01-frame.t'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/MANIFEST'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/notes/'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/notes/proto_notes.txt'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/MANIFEST.SKIP'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/tools/'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/tools/xs_proto_map'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/README'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl-Constructors-v0.0.4/Build.PL'
[MSG] [Mon Sep 24 15:47:29 2012] Extracted 'wxPerl::Constructors' to 'C:\Users\sp\AppData\Roaming\.cpanplus\5.16.1\build\wxPerl-Constructors-v0.0.4'
[MSG] [Mon Sep 24 15:47:30 2012] Set up gcc environment - 3.4.5 (mingw-vista special r3)
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'wxPerl-Constructors' version 'v0.0.4'


[MSG] [Mon Sep 24 15:47:30 2012] DEFAULT 'filter_prereqs' HANDLER RETURNING 'sub return value'
[MSG] [Mon Sep 24 15:48:07 2012] Set up gcc environment - 3.4.5 (mingw-vista special r3)
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Building wxPerl-Constructors


[MSG] [Mon Sep 24 15:48:10 2012] MAKE TEST passed:
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Set up gcc environment - 3.4.5 (mingw-vista special r3)
# Testing wxPerl::Constructors v0.0.4
t\00-load.t ... ok
t\01-frame.t .. ok
All tests successful.
Files=2, Tests=5, 1 wallclock secs ( 0.09 usr + 0.03 sys = 0.12 CPU)
Result: PASS


[MSG] [Mon Sep 24 15:48:13 2012] Set up gcc environment - 3.4.5 (mingw-vista special r3)
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Building wxPerl-Constructors
Installing C:\Perl\site\lib\wxPerl\Constructors.pm
Installing C:\Perl\site\lib\wxPerl\Constructors\argmap.pm
Installing C:\Perl\site\lib\wxPerl\Constructors\argmap.pod
Installing C:\Perl\site\lib\wxPerl\Constructors\doc.pod
Installing C:\Perl\man\man3\wxPerl.Constructors.3
Installing C:\Perl\man\man3\wxPerl.Constructors.argmap.3
Installing C:\Perl\man\man3\wxPerl.Constructors.doc.3
Installing C:\Perl\html\site\lib\wxPerl\Constructors.html
Installing C:\Perl\html\site\lib\wxPerl\Constructors\argmap.html
Installing C:\Perl\html\site\lib\wxPerl\Constructors\doc.html
Building ActivePerl Table of Contents
For ActivePerl's PPM: touch 'C:\Perl\lib\perllocal.pod'
Name "ExtUtils::packlist::FH1" used only once: possible typo at C:/Perl/lib/ExtUtils/Packlist.pm line 25.
[ERROR] [Mon Sep 24 15:48:13 2012] IPC::Run version '0.55' is required on MSWin32 in order to capture buffers. The logfile generated may not contain any useful data, until it is installed


I went ahead and installed IPC::Run on my machine :

[MSG] [Mon Sep 24 15:55:21 2012] Trying to get 'ftp://ftp.cpan.org/pub/CPAN/authors/id/T/TO/TODDR/IPC-Run-0.92.tar.gz'
[MSG] [Mon Sep 24 15:55:24 2012] Trying to get 'ftp://ftp.cpan.org/pub/CPAN/authors/id/T/TO/TODDR/CHECKSUMS'
[MSG] [Mon Sep 24 15:55:26 2012] Checksum matches for 'IPC-Run-0.92.tar.gz'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/abuse/'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/Changes'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/eg/'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/lib/'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/LICENSE'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/Makefile.PL'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/MANIFEST'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/META.json'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/META.yml'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/README'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/TODO'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/97_meta.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/98_pod.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/98_pod_coverage.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/99_perl_minimum_version.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/adopt.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/binmode.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/bogus.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/filter.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/harness.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/io.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/kill_kill.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/lib/'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/parallel.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/pty.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/pump.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/run.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/signal.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/timeout.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/timer.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/win32_compile.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/windows_search_path.t'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/t/lib/Test.pm'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/lib/IPC/'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/lib/IPC/Run/'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/lib/IPC/Run.pm'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/lib/IPC/Run/Debug.pm'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/lib/IPC/Run/IO.pm'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/lib/IPC/Run/Timer.pm'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/lib/IPC/Run/Win32Helper.pm'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/lib/IPC/Run/Win32IO.pm'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/lib/IPC/Run/Win32Pump.pm'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/eg/factorial'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/eg/factorial_pipe'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/eg/factorial_scalar'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/eg/run_daemon'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/eg/runsh'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/eg/runsu'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/eg/synopsis_scripting'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/abuse/blocking_debug_with_sub_coprocess'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/abuse/blocking_writes'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/abuse/broken_pipe_on_bad_executable_name'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC-Run-0.92/abuse/timers'
[MSG] [Mon Sep 24 15:55:26 2012] Extracted 'IPC::Run' to 'C:\Users\sp\AppData\Roaming\.cpanplus\5.16.1\build\IPC-Run-0.92'
[MSG] [Mon Sep 24 15:55:27 2012] Set up gcc environment - 3.4.5 (mingw-vista special r3)
Checking if your kit is complete...
Looks good
Writing Makefile for IPC::Run
Writing MYMETA.yml and MYMETA.json


[MSG] [Mon Sep 24 15:55:27 2012] DEFAULT 'filter_prereqs' HANDLER RETURNING 'sub return value'
[MSG] [Mon Sep 24 15:56:06 2012] cp lib/IPC/Run/Debug.pm blib\lib\IPC\Run\Debug.pm
cp lib/IPC/Run/Win32Pump.pm blib\lib\IPC\Run\Win32Pump.pm
cp lib/IPC/Run.pm blib\lib\IPC\Run.pm
cp lib/IPC/Run/Win32IO.pm blib\lib\IPC\Run\Win32IO.pm
cp lib/IPC/Run/IO.pm blib\lib\IPC\Run\IO.pm
cp lib/IPC/Run/Win32Helper.pm blib\lib\IPC\Run\Win32Helper.pm
cp lib/IPC/Run/Timer.pm blib\lib\IPC\Run\Timer.pm


[MSG] [Mon Sep 24 15:56:57 2012] MAKE TEST passed: C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/97_meta.t .................. skipped: Author tests not required for installation
t/98_pod.t ................... skipped: Author tests not required for installation
t/98_pod_coverage.t .......... skipped: Author tests not required for installation
t/99_perl_minimum_version.t .. skipped: Author tests not required for installation
t/adopt.t .................... skipped: adopt not implemented yet
t/binmode.t .................. ok
t/bogus.t .................... ok
t/filter.t ................... ok
t/harness.t .................. ok
t/io.t ....................... ok
t/kill_kill.t ................ skipped: Temporarily ignoring test failure on Win32
t/parallel.t ................. skipped: Parallel tests are dangerous on MSWin32
t/pty.t ...................... skipped: IO::pty not installed
t/pump.t ..................... ok
t/run.t ...................... ok
t/signal.t ................... skipped: Skipping on Win32
t/timeout.t .................. ok
t/timer.t .................... ok

Subroutine IPPROTO_TCP redefined at C:/Perl/lib/Socket.pm line -1.
t/win32_compile.t ............ ok
t/windows_search_path.t ...... ok
All tests successful.
Files=20, Tests=645, 51 wallclock secs ( 0.22 usr + 0.05 sys = 0.27 CPU)
Result: PASS

[MSG] [Mon Sep 24 15:57:21 2012] Installing C:\Perl\html\site\lib\IPC\Run.html
Installing C:\Perl\html\site\lib\IPC\Run\Debug.html
Installing C:\Perl\html\site\lib\IPC\Run\IO.html
Installing C:\Perl\html\site\lib\IPC\Run\Timer.html
Installing C:\Perl\html\site\lib\IPC\Run\Win32Helper.html
Installing C:\Perl\html\site\lib\IPC\Run\Win32IO.html
Installing C:\Perl\html\site\lib\IPC\Run\Win32Pump.html
Installing C:\Perl\site\lib\IPC\Run.pm
Installing C:\Perl\site\lib\IPC\Run\Debug.pm
Installing C:\Perl\site\lib\IPC\Run\IO.pm
Installing C:\Perl\site\lib\IPC\Run\Timer.pm
Installing C:\Perl\site\lib\IPC\Run\Win32Helper.pm
Installing C:\Perl\site\lib\IPC\Run\Win32IO.pm
Installing C:\Perl\site\lib\IPC\Run\Win32Pump.pm
Appending installation info to C:\Perl\lib/perllocal.pod

 
So did you reinstall wxPerl::Constructors after installing IPC::Run? Did it succeed this time?

Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
 
I have tried to re-install this. Here is the message in the console for the successful installation.

cpan> install wxPerl::Constructors
←[32mReading 'C:\Perl64\cpan\Metadata'←[0m
←[32m Database was generated on Mon, 24 Sep 2012 11:10:52 GMT←[0m
←[32mwxPerl::Constructors is up to date (v0.0.4).←[0m
←[32m←[0m

I have tried executing the script relating the location to where it is installed, but the same error is being thrown by the console.
Please let me know where am I missing. There seems to be something wrong in my execution or my script, which I could not able to test figuring it out rather than just keeping all the installed .pm locations.

Here is my program : (This is just a base example program to see if this works after the wxPerl::Constructors installation.)
#!/usr/bin/perl

use strict;
use warnings;

use Wx;
use wxPerl::Constructors::Doc;
#use lib qw(C:\Perl\site\lib\wxPerl);
#use lib qw(C:/Perl/lib/);
#use lib qw(C:/Perl/site/lib/);
use local::lib;


package MyApp;

use base 'wx::App';

Sub OnInit {

my $self = shift;

my $frame = wxPerl::Frame->new (
style => &Wx::wxMAXIMIZE_BOX | &Wx::wxCLOSE_BOX

);

$frame -> show;

}

MyApp->new->MainLoop;

#or, just setting a size :
my $frame = Wx::Frame->new (
undef,
-1,
'A Prometheus Application',
&Wx::wxDefaultPosition,
[800, 600],

);

# or, with just the defaults:

my $frame = wxPerl::Frame->new (undef, 'CGDP Application');

 
Well... I thought I would install it myself just to see (under Strawberry Perl)... half an hour later it is still compiling dependencies. :-/

Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
 
I don't think the problem is with the module installation, it's with your code. Case matters.

'sub' is all lowercase.

'Wx:App' has a capital W.

You need to 'use wxPerl::Constructors;'. The doc part is just the documentation for it. Those are the first things that I notice anyway...

Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
 
Annihilannic, you are absolutely right. The problem is not with the module installation, it is with the code.
I have corrected the code it worked fine, but one thing I would like to share with you is wxPerl::Constructors has no "wxPerl::Frame->new" object. It has Text Controls, I have pointed to right object and it worked absolutely fine.
Thank you very much Annihilannic.
 
My bad, I was wrong, it does have 'wxPerl::Frame->new', but I have again changed somethings related to the code and it worked fine.
wxPerl::Constructors has wxPerl::Frame->new
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top