wa5nti has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks – I just bought the book titled “Beginning Perl” by Curtis Poe. After reading up to page 11, I decided to uninstall my WinXP machine’s “ActiveState Perl” and install “Strawberry-perl 5.20.2.1” to replace it, because Curtis Poe says in his book that he uses Strawberry for most of the examples in the book.

I seem to have 'Win32 Strawberry-perl 5.20.2.1’ partially installed now.

The problem is: Perl does NOT seem to be running properly.

I suspect that the problem may stem from the fact that when I installed Strawberry, I did not install it on the normal “C:\” drive (that disk is quite full) – I took the install option that was offered to me at install time and installed Strawberry Perl on my “H:\” disk drive.

This is a new installation of perl on this machine – I’ve never used perl before.

I’m in a CMD or DOS window on my Windows XP machine

The system responds with: C:\Documents and Settings\Kelley McCarty>

I type perl –v

The system then responds with” This is perl 5, version 20, subversion 2 <v5.20.2> built for MSWin32-x86-multi-thread-64int Copyright 1987-2015, Larry Wall ……………..

The system then responds with: C:\Documents and Settings\Kelley McCarty>

I type perldoc –v perldoc The system then responds with:’perldoc’ does not look like a Perl variable

Next I type perldoc perl

The system then responds with:”Error in tempfile%lt;> using template C:\WINDOWS\TEMP \XXXXXXXXXX: Could not create l/lib/Pod/Perldoc.pm line 1888.

Why are these two commands not being executed like the “Beginning Perl book by Curtis “Ovid Poe” says they should on page 11 ?

-- Terry McCarty

3t3@comcast.net

--- wa5nti---

Summary of my perl5 (revision 5 version 20 subversion 2) configuration +: Platform: osname=MSWin32, osvers=6.3, archname=MSWin32-x86-multi-thread-64in +t uname='Win32 strawberry-perl 5.20.2.1 #1 Sat Feb 21 12:32:00 2015 +i386' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags =' -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPER +L_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-stri +ct-aliasing -mms-bitfields', optimize='-s -O2', cppflags='-DWIN32' ccversion='', gccversion='4.8.3', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='lo +ng long', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++', ldflags ='-s -L"H:\Data\perl\lib\CORE" -L"H:\Data\c\lib" +' libpth=H:\Data\c\lib H:\Data\c\i686-w64-mingw32\lib H:\Data\c\lib\ +gcc\i686-w64-mingw32\4.8.3 libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 +-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -l +mpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdl +g32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_3 +2 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 libc=, so=dll, useshrplib=true, libperl=libperl520.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=xs.dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -s -L"H:\Data\perl\lib\CORE" -L"H +:\Data\c\lib"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF Built under MSWin32 Compiled at Feb 21 2015 12:36:01 @INC: H:/Data/perl/site/lib H:/Data/perl/vendor/lib H:/Data/perl/lib .

Replies are listed 'Best First'.
Re: Strawberry Perl NOT running properly
by Corion (Patriarch) on Apr 19, 2015 at 09:16 UTC
    ... using template C:\WINDOWS\TEMP \XXXXXXXXXX: Could not create ...

    Are you sure that C:\WINDOWS\TEMP \XXXXXXXXXX (with that space after TEMP) is the value as presented?

    Maybe your TEMP environment variable is set to a wrong/non-existing directory, like "C:\WINDOWS\TEMP " (with that additional space)?

    You said that C: is quite full. Maybe it is so full that the temp directory cannot hold the additional file?

Re: Strawberry Perl NOT running properly
by dave_the_m (Monsignor) on Apr 19, 2015 at 10:56 UTC
    I type perldoc –v perldoc The system then responds with:’perldoc’ does not look like a Perl variable
    That is the correct response. You've asked perldoc to give you information about a variable (-v) called perldoc, and it's telling you that perl doesn't have a built-in variable of that name.

    Dave.

      ...but I just checked, and the meaning of the -v flag changed between version 5.10.0 and 5.12.0, which probably explains why the book suggested that syntax,

      Dave.

Re: Strawberry Perl NOT running properly
by Don Coyote (Hermit) on Apr 19, 2015 at 15:25 UTC

    Hello wa5nti and welcome to the monastery.

    Where to start? There could be many reasons for this occurence, so I can only make suggestions.

    I was struck by the fact that your installation was attempting to install the perldoc program. In my experience Strawberry auto installs this. I find the documentation an inextricable part of the language and its distributions.

    Non-installation of perldoc in Strawberry occurs when a certain config variable is defined at install time.


    =item C<versiononly>

    From F<versiononly.U>:

    If set, this symbol indicates that only the version-specific
    components of a perl installation should be installed.
    This may be useful for making a test installation of a new
    version without disturbing the existing installation.
    Setting versiononly is equivalent to setting installperl's -v option.

    In particular, the non-versioned scripts and programs such as
    a2p, c2ph, h2xs, pod2*, and perldoc are not installed
    (see C<INSTALL> for a more complete list). Nor are the man
    pages installed.
    Usually, this is undef.

    Heres a one liner to see if this variable was defined at installation.

    windos% perl -Mv5.20 -Mstrict -MConfig -w -e "say $Config{versiononly} +"

    Should you find this variable is defined in some way, the simplest method would most likely be to re-install taking care not to install a version dependant version.

    Other than that there are a huge number of variables, that do not show up in the perl -V invocation. Given the difficulty of being able to run perldoc, you may find a look at some of the path variables in the list lead you somewhere useful.

    #!perl use 5.20; use strict; use warnings; use Config qw/config_sh/; open my $fh, '>', '.\configlist.txt' or die $!; print {$fh} config_sh(); close $fh;

    This will provide a list something along the form of what can be seen here Example Config Variable Listing (note: Example is defined as relating to use in this forum reply, not the code itself).

    Maybe check libpath variables in this list, and also permissions on the directories the paths indicate. For TMP paths, I usually see a shortname as upper case suffixed with tilde V:\STRAWB~\lib\path\

    Pod is included with modules, you can check the scripts directly, and Pod is accessible through online sources CPAN Perl5

    Perl is Perl, if none of this helps, maybe consider re-installing Active-State, as it was working for you previously, until you are more familiar with the language.

    I hope this helps. Local access to all the really useful beginners documentation is essential for a good learning experience.

    On Review

    edit: no such thing as facts. Ambiguous error messages yes.

    For further insight to the problem you can try supplying debug options to perldoc.

    from perldoc docs perldoc perldoc

    Having PERLDOCDEBUG set to a positive integer will make perldoc emit even more descriptive output than the "-D" switch does; the higher the number, the more it emits.
    windos% perldoc -D # or windos% set PERLDOCDEBUG=9 # 0..9

    In particular when outputting through a pager to the terminal(perldoc default behaviour), Perldoc creates TMP files to construct the output. Using the -d, -T,or -t options may circumnavigate this by directing the output specifically. Worth trying, while you figure out the root of the problem.

    The -q,-f options require temp files to work, so they will not be useable until your main problem is fixed


    Why are you re-inventing the wheel? So I can test it goes round!
Re: Strawberry Perl NOT running properly
by Laurent_R (Canon) on Apr 19, 2015 at 14:48 UTC
    You might consider the portable version of Strawberry Perl, everything in one single place (one directory and some subdirectories).

    Je suis Charlie.