Identifying ActiveState perl from within a script

B

Bill Cernansky

Does anyone know:

Is there a special variable or available value that can be examined
inside of a perl script that will tell me if the interpreter is
ActiveState?

I know how to get the version. I need the flavor.

I searched quite a bit for this info before coming here. Perhaps it's
just not common knowledge, or I just am not as good at searching as I
think.
 
B

Bob Walton

Bill Cernansky wrote:

....
Is there a special variable or available value that can be examined
inside of a perl script that will tell me if the interpreter is
ActiveState?

I know how to get the version. I need the flavor.
....

One way:

D:\junk>perl -e "print 'AS' if `perl -v`=~/ActiveState/"
AS
D:\junk>
 
J

John Bokma

Bill Cernansky said:
Does anyone know:

Is there a special variable or available value that can be examined
inside of a perl script that will tell me if the interpreter is
ActiveState?

I know how to get the version. I need the flavor.

I searched quite a bit for this info before coming here. Perhaps it's
just not common knowledge, or I just am not as good at searching as I
think.

using Config?

ccflags='-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -
DNO_STRICT -DHAVE_DES_FCRYPT -DBUILT_BY_ACTIVESTATE -DNO_HASH_SEED -
DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO
-DPERL_MSVCRT_READFIX'

:
:

cf_email='support#ActiveState.com'

I just wonder why...
 
R

Randy Kobes

Bill said:
Does anyone know:

Is there a special variable or available value that can be examined
inside of a perl script that will tell me if the interpreter is
ActiveState?

For ActiveState Perl, Win32::BuildNumber() will return
the ActivePerl build number.
 
B

Bill Cernansky

First, thanks for the responses, everyone.

John said:
I just wonder why...

Mixed development environment caused by merging of two large companies.

We're in the process of dumping a legacy perl (MKS) out of the
environment, but for the time being, we need certain scripts to run
regardless of environment.

MKS perl screws around with backslashes in paths that get sent to
system() or backticked commands. It's crazy that a toolset that is
supposed to provide unix-like functionality actually breaks perl
compatibility.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top