Re: Win32 Perl-Critic Setup Question
by ikegami (Patriarch) on May 29, 2008 at 09:15 UTC
|
Your Scalar::Util needs to be recompiled.
That's odd, cause the one I have with ActivePerl 5.8.0 and ActivePerl 5.8.8 works:
>c:\progs\perl580\bin\perl -e"use Scalar::Util qw( weaken ); weaken \$
+a"
>c:\progs\perl588\bin\perl -e"use Scalar::Util qw( weaken ); weaken \$
+a"
| [reply] [Watch: Dir/Any] [d/l] |
|
Hi Ikegami,
Many thx for the info.
When running the line you provided I get:
perl -e"use Scalar::Util qw( weaken ); weaken \$a"
Weak references are not implemented in the version of perl at -e line 1
BEGIN failed--compilation aborted at -e line 1.
How do you advise to compile Scalar::Util? I'm not so familiar with this.
Many thanks!
ddn123456
| [reply] [Watch: Dir/Any] |
|
Hi,
Just did the compile procedure with "Scalars::Utils":
- perl Makefile.PL
- make
- make test
....t\dualvar.......skipped
....all skipped: dualvar requires XS version
....t\first.........ok
....2/17 skipped: Poor man's MULTICALL can't cope
....t\isvstring.....skipped
....all skipped: isvstring requires XS version
....t\proto.........skipped
....all skipped: set_prototype requires XS version
....2/23 skipped: Poor man's MULTICALL can't cope
....t\weak..........skipped
....all skipped: weaken requires XS version
....All tests successful, 4 tests and 4 subtests skipped.
....Files=35, Tests=331, 3 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU)
- make install
However afterwards the error remains.
How should I tackle this?
Thx!
ddn123456
| [reply] [Watch: Dir/Any] |
|
Re: Win32 Perl-Critic Setup Question
by Herkum (Parson) on May 29, 2008 at 15:05 UTC
|
I had all sorts of problems with this, there is a high probability that you 'accidently' installed a version of Scalar::Util that does not have 'weaken'. Actually I am willing to bet that is the case. The Scalar::Util that ActiveState includes is pre-compiled, if you had been using CPAN to update your modules, there is a good chance that you blew the original version away and replaced it with something that does not have weaken.
The two suggestions I can give you are,
- Upgrade your version of Perl, the latest ActivePerl was 5.8.8 (no looking at 5.10 BTW).
- Move the Scalar::Util module somewhere and attempt to reinstall the version that's on your system now.
| [reply] [Watch: Dir/Any] |
|
Hi Herkum,
Great to hear this.
Tomorrow morning first thing at the office (working at home now) I'll try out your suggestion un-&re-installing ActiveState.
Concerning the upgrade I'm a bit blocked since I have to make IT happen with Perl 5.8.6. Taking into account Ikegami's comment about 5.8.0, 5.8.6 ought to support it.
FYI. On Perl 5.10 it installs and works fine.
I'll keep you posted further on.
Many thanks.
ddn123456
| [reply] [Watch: Dir/Any] |
|
Hi Herkum,
After a un-&re-install of ActiveState 5.8.6, installing "Bundle-Perl-Critic" from the ActiveState ppm and then all specific packages it works now.
Originally I had indeed installed through cpan the "Bundle-Perl-Critic-IncludingOptionalDependencies".
Re-installing through ActiveState ppm the "Scalars::Util" always got stuck on the XS-part being skipped.
As of Perl 5.8.8 the MinGW GCC compiler is supported, older versions (such as 5.8.6) still need the Microsoft VC++ compiler (meaning licenses, etcetera).
There is the tutorial how to achieve this with VC++. I'll test it out soon how to achieve this with VS2005. (The VS2005 is preferable to VS2003 due to VS2003 digital signature restrictions on compiled dll's.)
Many thanks for sharing your experiences!
Many thanks to all the other perlmonks who answered!
Greetings
ddn123456
| [reply] [Watch: Dir/Any] |
|
older versions (such as 5.8.6) still need the Microsoft VC++ compiler
You can use MinGW with older versions of ActivePerl if you install Extutils::FakeConfig and then:
set perl5opt=-MConfig_m
This is covered in a little more detail in Compiling C/C++ based Modules under ActiveState using MinGW. I've been using this method with ActivePerl build 806 (perl-5.8.0) with good mileage.
Cheers, Rob | [reply] [Watch: Dir/Any] [d/l] |
|
Re: Win32 Perl-Critic Setup Question
by GrandFather (Saint) on May 29, 2008 at 09:21 UTC
|
ActiveState have Bundle::Perl::Critic 1.0 available in their ppm repository. Alternatively Perl::Critic 1.082 is available from the Trouchelle repository at http://trouchelle.com/ppm/package.xml
Perl is environmentally friendly - it saves trees
| [reply] [Watch: Dir/Any] |
|
Hi,
Thx! Doing that I also got stuck yesterday on the weaken instruction. :-(
Thx anyway!!! Regards.
ddn123456
| [reply] [Watch: Dir/Any] |
|
On my system, I had to use /opt/ActivePerl-5.8/bin/cpan -f Task::Weaken
| [reply] [Watch: Dir/Any] [d/l] |
Re: Win32 Perl-Critic Setup Question
by poolpi (Hermit) on May 29, 2008 at 13:08 UTC
|
perl -MCPAN -e shell
force install Scalar::Util
hth, PooLpi
'Ebry haffa hoe hab im tik a bush'. Jamaican proverb
| [reply] [Watch: Dir/Any] [d/l] |
|
Hi,
Thx. Executed your suggestion.
Got stuck on this XS-version again.
....t/weak..........skipped
....all skipped: weaken requires XS version.
Going to try it out this evening on perl 5.10. However here 'm in a prod environment with limited upgrade possibilities.
Thx to you all for the help.
ddn123456
| [reply] [Watch: Dir/Any] |