| Author |
Identifying ActiveState perl from within a script
|
|
| Bill Cernansky 2005-09-12, 6:57 pm |
| 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.
| |
| Bob Walton 2005-09-12, 9:56 pm |
| 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>
--
Bob Walton
Email: http://bwalton.com/cgi-bin/emailbob.pl
| |
| John Bokma 2005-09-12, 9:56 pm |
| "Bill Cernansky" <whcernan@yahoo.com> wrote:
> 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...
--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
| |
| Randy Kobes 2005-09-14, 3:56 am |
| Bill Cernansky wrote:
> 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.
--
best regards,
randy kobes
| |
| Bill Cernansky 2005-09-27, 7:00 pm |
| First, thanks for the responses, everyone.
John Bokma wrote:
> 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.
--
Bill Cernansky
Resident Nut Case
|
|
|
|