ActiveState Community

ActivePerl

Tk compatibility problem with PPM module

OS: All / Any | Product: ActivePerl | tags: compatibility PPM Tk
Question:

I have installed the module Tk-TableMatrix 1.23 ( Installed from AS, using
AS Perl Package Manager). All my scripts using this module are broken. I
have tried to run the "demo" scripts provided in the package. And no matter
which one I run. I get the following message.
--> perl -w basic.pl

Tk::TcldeclsVtab wrong size for TcldeclsVtab at
C:/PRG/Perl/lib/DynaLoader.pm line 252.

Tk::TkeventVtab wrong size for TkeventVtab at C:/PRG/Perl/lib/DynaLoader.pm
line 252.

Answer:

You need a version of Tk-TableMatrix 1.23 that is compiled against Tk 804.x.

When the Tk shipped with ActivePerl was updated to 804.x in the middle of the 5.8.x series, it was recognized that modules which depended on Tk would need to be recompiled. Doing so would, however, makes those modules incompatible with older releases still using Tk 802.x. Since PPM only supports one version of any given module revision per repository, all those older 5.8.x releases would have lost their PPM sources.

Improvements to the functionality of PPM are envisioned which will allow dependency based selection of module versions. For now, the workaround has been to distribute different versions of these modules with compatibility issues from different PPM repositories, some of which are not maintained by ActiveState.

Modules with dependencies on Tk802.x will continue to be available at ActiveState. Modules with dependencies on Tk804.x are available from Randy Kobes' University of Winnipeg PPM repositories:
http://theory.uwinnipeg.ca/ppmpackages/

Problems installing ActivePerl

OS: Windows | Product: ActivePerl | tags: install msi
Question:

I downloaded Activeperl form your website, but when I go to start the installation process I get this error:

"This installation package could not be open contact the application vendor to ensure that this is a valid installer package."

What is wrong?

Answer:

People get this error if the the MSI installation package is corrupted during the download. You might have better luck downloading from our FTP site:

http://downloads.activestate.com/

Note that you can verify the downloaded file against the MD5SUMS published in each download directory:

http://downloads.activestate.com/ActivePerl/Windows/5.10/MD5SUM ( 5.10 )

http://downloads.activestate.com/ActivePerl/Windows/5.8/MD5SUM ( 5.8 )

http://downloads.activestate.com/ActivePerl/Windows/5.6/MD5SUM ( 5.6 )

You can get a tool to generate md5sum hashes from here:

http://www.pc-tools.net/win32/md5sums/

Perl IO redirection problems on Windows

OS: Windows | Product: ActivePerl | tags: activeperl io Perl pipe redirect windows
Question:

On Unix I can run commands like "foo.pl | bar.pl" and have the output of foo.pl be the input of bar.pl. This doesn't seem to work on Windows. How can I make this work?

Answer:

The Windows command interpreter cmd.exe does not support IO redirection for programs started via shell associations, like those created for .pl files during the ActivePerl installation. It only works for .bat, .com, .cmd, and .exe files.

You need to write:

perl foo.pl | perl bar.pl

Or if the files are not in your current directory but are on the PATH:

perl -S foo.pl | perl -S bar.pl

Alternatively, you can wrap your .pl files into .bat scripts using pl2bat:

pl2bat foo.pl
pl2bat bar.pl

Then run them as:

a | b

This is also the case for > and <.

ActivePerl and the 2007 Daylight Savings Time changes

OS: Windows | Product: ActivePerl
Question:

What are the implications of the March 2007 DST changes for ActivePerl running on Windows?

Answer:

The daylight saving time (DST) for the localtime() function is
determined by the C runtime library function of the same name.

This function has 2 different operating modes:

1) The TZ environment variable has been set.

In this case MSVCRT calculates DST itself, based on the USA rules.
The latest released version (as of (March 5th 2007) of MSVCRT.dll has
not yet been updated for the 2007 DST rules. The localtime() function
will still apply the old rules to 2007. Microsoft claims to have a
hotfix for this, that is available from Microsoft Customer Support
Services only:

http://support.microsoft.com/kb/932590

2) The TZ environment variable has *not* been set.

In this case MSVCRT retrieves the DST transition times from the
GetTimeZoneInformation() API:

http://msdn2.microsoft.com/en-us/library/ms724421.aspx

This API only provides the transition times according to the *current*
DST rules. There is no database of historical transition times. That
means that localtime() applied to previous years will use the new
transition times even for old timestamps.

Windows Vista (and Longhorn Server) support a new API called
GetDynamicTimeZoneInformation() that implements a database of historic
DST rules. It is not known if the hotfix mentioned above will make
use of this API when running on Vista.

PPM Firewall problems

OS: All / Any | Product: ActivePerl
Question:

When I try to install a ppm package I get this error:

Downloading ActiveState Package Repository packlist...failed 500
Can't connect to ppm4.activestate.com:80 (connect: Unknown error)

Answer:

It looks like your local network firewall or Proxy is preventing you from connecting with our ppm servers. Instructions on how to configure Proxy authentication are available here:

http://aspn.activestate.com/ASPN/docs/ActivePerl/faq/ActivePerl-faq2.htm...

Alternatively, you can download zip packages for the modules you need from:

http://ppm.activestate.com/PPMPackages/zips/

- first unzip the package to a temporary directory
- next, install the package by specifying the ppd file directly:

ppm install c:\tmp\module-name.ppd

Please note that some modules have dependencies and may fail to install because of this. It would be helpful to, on an internet-connected machine, use ppm's 'tree' command to see what dependencies there are:

ppm> tree Date-Calc
====================
Date-Calc 5.3
\__Bit-Vector 0.0
====================

DST and ActivePerl

OS: All / Any | Product: ActivePerl | tags: activeperl dst time
Question:

Will ActivePerl handle the new US DST changes?

Answer:

ActivePerl relies on the underlying operating system for any date information. Providing the operating systems are patched to take into account the new DST laws there should be no issues.

Please note that you will want to ensure that you check any extra modules (beyond the core and enterprise edition modules that we provide) that are used are up to date.

For example:

DateTime::Timezone

This module needs updating, as it contains actual switchover times for various time zones. The module is updated frequently on CPAN to keep it in sync with the Olson timezone database and the latest version contains the updated rules.

What is the best version of ActivePerl to use with Windows Vista?

OS: Windows Vista | Product: ActivePerl | tags: compatibility Perl vista windows
Question:

What is the best version of ActivePerl to use with Windows Vista?

Answer:

The best version of ActivePerl to use on Windows Vista is always the most recent build of ActivePerl 5.8.8 or 5.10.0.

ActivePerl 5.8.8.819 and later versions pass the same suite of tests on Windows Vista as they do on Windows XP and other supported versions of Windows.

ActivePerl's known issues on Windows Vista include:

  • PerlIS and PerlEx are installed but not automatically configured due to differences in the script extension mapping process for IIS
  • the OLE browser will not function with Internet Explorer 7

If you run into other issues, please report them at:

http://bugs.activestate.com

PPM4 fails on Windows systems for users with non-ASCII usernames

OS: Windows | Product: ActivePerl | tags: activeperl multibyte ppm4
Question:

PPM4 fails on Windows systems where users have non-ASCII characters in their username and/or there are non-ASCII characters in common paths. Is there a work-around for this?

Answer:

*******************
This issue has been resolved in ActivePerl 820 and higher
*******************

PPM in ActivePerl 819 on Windows fails to start up for users with non-ASCII user names. The error message displayed is something like:

  ppm gui failed: DBI connect('dbname=C:\Documents and Settings\
    \Application Data/ActiveState/ActivePerl/ppm-MSWin32-x86-multi-thread-5_8.db',
    '',...) failed: unable to open database file(1)

This is caused by limitations in Perl's handling of Unicode and we plan to address this issue in the upcoming release. The recommended workaround is to tell PPM to access its state database from a path consisting of plain ASCII characters only. It is achieved by setting the ACTIVEPERL_PPM_HOME environment variable to the name of a directory that ppm should use. For instance:

   C:\> set ACTIVEPERL_PPM_HOME=C:\Perl\Temp
   C:\> ppm

Unattended installation of ActivePerl in a custom directory on Solaris

OS: Solaris | Product: ActivePerl | tags: activeperl automation install unattended
Question:

I need to install ActivePerl in a custom directory on Solaris without any user interaction. How can I do that?

Answer:

There are two ways to install ActivePerl in a custom directory on Solaris such that the installation can be run unattended.

The first is to use the "--license-accepted --prefix /path/to/install/to" arguments to the install.sh provided in the Tar/Gzip ActivePerl package:

gnutar zxf ActivePerl-solaris-package.tar.gz
cd ActivePerl-directory
sh install.sh --license-accepted --prefix /opt/ActiveState/ActivePerl

The above can be used in a shell script, for example.

Alternatively, you can make your own Solaris package. This has the benefit of registering ActivePerl with the Solaris packaging system, making upgrades easier in some cases. A good tutorial on making Solaris packages can be found here:

http://www.sunfreeware.com/pkgadd.html

Why doesn't the PPM website work?

OS: All / Any | Product: ActivePerl | tags: PPM server error website
Question:

I'm trying to browse the PPM website. Why am I getting an Internal Server Error?

Answer:

The PPM server has two interfaces. The first is a SOAP interface that is used by the PPM client, at this url:

http://ppm.activestate.com/cgibin/PPM/ppmserver.pl?urn:/PPMServer

The second is a regular web interface for your browser. The SOAP interface uses the URL shown above and will give an error if you try to access it using a browser. The URL for the regular web interface is:

http://ppm.activestate.com/