EPIC unable to detect PadWalker in Eclipse - eclipse

I am using perl version 5.16.3. I have installed PadWalker using this:
sudo apt-get install libpadwalker-perl
After restarting eclipse when I started debugging I am still getting the error:
Error displaying local variables
Install PadWalker & restart Eclipse or disable displaying of local variables
Can anybody help?
Thanks,
Sumit

You have two builds of Perl installed:
/usr/bin/perl (the "system" perl)
/home/demo/perl5/perlbrew/perls/perl-5.16.3/bin/perl
apt-get install libpadwalker-perl installs the package for the system Perl.
I'm assuming you've configured EPIC to use the other, and this is the one that needs PadWalker. Run
perlbrew use 5.16.3
cpan PadWalker
or
/home/demo/perl5/perlbrew/perls/perl-5.16.3/bin/cpan PadWalker

Related

Error locating modules using perlbrew and cpanm

I want to use perlbrew and cpanm on my machine. I installed perlbrew like this
curl -L http://install.perlbrew.pl | bash
and sourced ~/perl5/perlbrew/etc/bashrc in my .bashrc. Next I installed perl v5.21.5 and switched to this version.The which perl command points to my perlbrew installation. The same is true for cpanm.
But when I install a perl module like cpanm Mojo Neither the binaries are installed nor the includes can be located. But all tests pass. I looked under ~/perl5/ and could not find the sources. Does anyone had the same issue before? I may have used cpan on my Ubuntu 14.04 before. May this cause any problems? How can I figure out where cpanm put the module?
BTW: I'm using perlbrew version 0.71
I solved the problem by deleting everything perl-related in my home directory. The folder ~/.cpan had write-proteced files. Only the sudo user could delete them. I assume I used cpan as root in the past. In addition I deleted ~/.cpanm and ~/perl5. After reinstalling perlbrew, perl and mojolicious, everything worked out of the box.
In my case I was just trying to get some perl code running. Many thanks to the #perl channel on irc.freenode.net.
I first used local::lib but may not have fully cleaned up after using it. The modules I needed for the code I was trying to get running would not run with the system perl. It was just too old.
Then I tried perlbrew install perl-5.20.1 and perlbrew install-cpanm. It felt great to start fresh with a known quantity. Yet I found that modules were passing tests and said they were installing but not getting found and used. Dependencies were trying to be continuously reinstalled. Installing the dependencies one at a time didn't even work. It was baffling. Somewhere along the way I read to set PERL_MB_OPT and PERL_MM_OPT though I think I should have also set PERL5LIB with those.
So I started over with perlbrew after rm -rf ~/.cpan ~/.cpanm ~/perl5. Everything just works now. Hurray!
Are you running the cpanm command in a new terminal window by chance, if so it might not use the new perl you brewed.
"perlbrew use" only makes the current shell use the brewed perl whereas "perlbrew switch" makes all new shells of the current user use the selected perl.
You should provide the output of "perl -V" and "perlbrew info"
Here is a tip how you can find where cpanm installed a module:
1) install locate (sudo aptitude install locate)
2) run "sudo updatedb" (creates the index used by locate)
3) run "locate Mojo" to see where the files have been created.
Also interesting would be to know which cpanm binary you are using. "which cpanm"
You can install a perlbrew-wide cpanm with "perlbrew install-cpanm"
[ I'm going to assume you started a fresh shell (e.g. reopened your terminal or executed exec bash) or sourced ~/perl5/perlbrew/etc/bashrc in your current shell after installing perlbrew ]
Which Perl did you use to install cpanm? cpanm will install modules for the Perl that runs it, which will be the one mentioned on the first line of cpanm if you run it as cpanm ....
Options:
Use cpan instead of cpanm.
Install cpanm using your newly installed Perl.
Use perl -S cpanm ... as a workaround.

How to operate the Perl debugger in Eclipse/EPIC

I have installed ActivePerl, and I would like to debug a Perl program using Eclipse and EPIC.
I have installed Eclipse and EPIC, they look OK. (It's doing basic syntax checking on an example Perl program).
I then used PPM to install PadWalker (since that's what they say is needed to use the step debugger).
Now, in Eclipse, when I try to step through the program, I get the error: "Error: install PadWalker module to see local variables".
In PPM, I notice that it had installed PadWalker in area: "site", while all other Perl modules are installed in area: "perl".
For area: "site", #INC shows: ... .../Environments/Active Perl/site/lib
and for area: "perl", #INC shows: ... .../Environments/Active Perl/lib
What should I do?
My system: Windows 7 x64.
I found the answer in another forum. One has to install the "testing" EPIC version. Then the debugger works. (only after a certain bug in Cwd.pm is fixed). (On Windows).

How to change default perl installation to the one installed by macports

I installed perl5.14 via macports.
By typing
which perl
I get
/usr/bin/perl
How do I change the perl to point the macports one.
My .profile is:
# MacPorts Installer addition on 2012-02-02_at_14:42:32: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
Maybe the perl port isn't active? try:
$ sudo port activate perl5
sudo port install perl5 +perl5_14
You need to re-launch terminal for the export to take effect. As a quick but messy workaround you can always invoke perl like this:
/opt/local/bin/perl Remember to put that in your Perl scripts as well. Also, unlike unix I find I always have to use sudo when installing to a local directory.
Macports is great for installing all those non-Perl libraries that aren't installed on the Mac, however it is not so great for installing Perl modules as it is dependant on there being a port of it, you can't really use CPAN to install. perlbrew does work on the Mac and is a much better solution. But if you still want to use Macports to install non-Perl libraries you hit a problem. I solved it with a .profile like this:
source ~/perl5/perlbrew/etc/bashrc
# export PATH=/opt/local/bin:/opt/local/sbin:$PATH
Note the comment. The first line gives me my perlbrew Perl when I open terminal. When I want to use Macports to install libraries I swap the comment around and re-launch terminal and I then have Macports Perl. Of course this means I need two Perls on my machine, and they both need to be the same version but I don't have any problems with this.
Not being on a Mac, I cannot answer your exact question. However, many Perl users/developers now use perlbrew to install newer versions of Perl and manage choosing between them. I am fairly confident that it works on Mac. Read more at the website or CPAN.

How to install pp (PAR Packager)?

I have to create an exe from a Perl script. I installed
ActivePerl-5.14.2.1402-MSWin32-x86-295342.msi
How do I install pp?
I know this is a relatively old question, but for the sake of others, here is a solution that worked for me using pp (Par Packager):
Install Strawberry Perl for windows (I installed strawberry-perl-5.16.3.1-64bit.msi)
I used 5.16.3.1 because I wanted to try out perl2exe as well, while I'm at it (perl2exe at the time supported only up to 5.16.3 version of perl)
Once installed, open Strawberry Perl Tools (e.g. through start menu -> All programs -> Strawberry Perl -> Tools), and invoke CPAN Client
In the client console that opens, type:
get pp
install pp
Once installation is complete, you can simply run:
c:\strawberry\perl\site\bin\pp.bat -o myScript.exe myScript.pl
Which will produce a myScript.exe which is a standalone executable (no external perl interpreter is needed)
Note: You can use the -d command line switch in order to reduce the size of the executable. This will not include perl interpreter code inside the executable, reducing the size of the executable, however you will need to provide perl5x.dll in the same directory as your executable, or include it on the PATH environment variable.
Until the issue with 1.010 is fixed, do the following:
Go to http://search.cpan.org/dist/PAR-Packer/
From the "Other releases" drop down list, select PAR-Packer-1.009 and download it
Decompress the archive, preserving directory structure
Run perl Makefile.PL
Install all the missing prerequisites by hand using ppm. E.g., ppm install Module::ScanDeps etc
Install MingW: ppm install MingW
dmake, then dmake test, then dmake install
Later, you can remove PAR::Packer from the site area using the ppm GUI and install the fixed version.
This is a Perl module called PAR::Packer, so it can be installed as any Perl module with CPAN. Unfortunately, you're using ActivePerl which isn't quite compatible with CPAN. Instead, you can see if use ActiveState's Perl Package Manager to install this module.
If the module isn't available via the Perl Package Manger, you can try installing with the CPAN command line utility. Open up a Console Window (Start->Accessories->Command Prompt) and type in cpan and press <ENTER>. Newer versions of ActiveState should automatically install the required compilers, etc. when you first start to use CPAN.
I prefer Strawberry Perl for Windows because it's more compatible with CPAN. However, ActivePerl has a lot of the Win32 modules already installed. Plus, it comes with the Perl Package Manager which is nice.
WARNING: ActiveState installs a lot of these Perl scripts not in C:\Perl\bin, but in C:\Perl\Site\bin which means you have to make sure that directory is in your path too.
As of v1.010, the software cannot be automatically packaged, see the report at Trouchelle's repo.
Install CPAN using PPM, then continue as per the Stack Overflow Perl FAQ: What's the easiest way to install a missing Perl module?
ppm install MinGW
cpanp i Win32::Exe PAR::Packer
In addition to the above answers,
You can use cpan to install the PAR::Packer.
From your windows command prompt use the command: cpan install PAR::Packer.
Note: I have Strawberry perl installed.
cpan installs the modules and the dependencies as well.

Trying to install MinGW and Tk for Perl on Windows 7

So... I have been trying to get this working for several weeks now. I can install MinGW through the .exe, but no-matter what I do I can't seem to get make support or ppm install MinGW to work in such a way that my compilation of Tk-804.029 will correctly use the 'make' command.
(Installing a Perl Module:
perl MakeFile.PL - Works fine
make or dmake - I can't get MinGW to properly associate Make or DMake (Can't find the correct .exe in the MinGW/bin directory either... I've tried using the -32bit mingw32-make.exe but that brings up errors to do with the compiled header files.
)
ppm install MinGW also doesn't work, seems to think it can't find the package. So I am at a loss. System is running Windows 7 on a x64 setup.
What perl are you using? You could try
perl Makefile.PL MAKE=dmake
or
ppm install http://www.bribes.org/perl/ppm/Tk.ppd
ppm install dmake MinGW
ppm upgrade dmake MinGW
or download from
http://ppm4.activestate.com/author/MINGW.html
Or try http://strawberryperl.com/
I'd suggest using Strawberry Perl if possible (and for Perl on Windows in general), as it will give you a working dmake out of the box. I don't have Windows 7, but Tk installs fine from CPAN using Strawberry 5.10 on Windows XP.