Mailing List Archive

RE: The -S switch and associations.
It would seem to my that we remain a victim of vestiges of DOS. This makes
life really difficult for those of us trying to rationalize using NT as a WWW
server platform. Am As a Microsoft SP my hand are tied but one could always
hope for fully support alternative shell to cmd.

Cheers
Ralph Shillington

----------
From: owner-ntperl@mail.hip.com on behalf of Stuart Poulin
Sent: Thursday, November 09, 1995 1:01 PM
To: ntperl@mail.hip.com
Subject: The -S switch and associations.

Will the next release of Perl for Win32 support the associations
(assoc .pl=perl) with the -S switch?

Currently it complains it can't execute a script.

C:\users\stuart> perl -S foo.pl"
Can't execute c:\users\stuart\bin/foo.pl.

Should it really care? Shouldn't it just find the script and read
the lines.

Just typing foo.pl does work ( But then I can't pass command line
args :-( ).

Is it me, or is this whole start up issue on NT bogus? The pl2bat is a
lucky hack, and the .pl=perl association only half works. I just want
to startup my scripts and pass command line arguments. Why all the
hassle? (Just Venting)

Thanks,
Stuart

+---------------------------------------+-----------------------------------+
| Stuart Poulin | Phone: 206 882 5211 (Direct) |
| Applied Microsystems Corporation | 206 882 2000 |
| 5020 148th Ave NE | Email: stuart@amc.com |
| Redmond WA 98073 | WWW: http://www.amc.com |
+---------------------------------------+-----------------------------------+
#
RE: The -S switch and associations. [ In reply to ]
Micorsoft said they will "fix" the shell in the next release of NT so that
associations work correctly.

-- Dick

At 01:19 AM 11/10/95 UT, Ralph Shillington wrote:
>It would seem to my that we remain a victim of vestiges of DOS. This makes
>life really difficult for those of us trying to rationalize using NT as a WWW
>server platform. Am As a Microsoft SP my hand are tied but one could always
>hope for fully support alternative shell to cmd.
>
>Cheers
>Ralph Shillington
>
>----------
>From: owner-ntperl@mail.hip.com on behalf of Stuart Poulin
>Sent: Thursday, November 09, 1995 1:01 PM
>To: ntperl@mail.hip.com
>Subject: The -S switch and associations.
>
>Will the next release of Perl for Win32 support the associations
>(assoc .pl=perl) with the -S switch?
>
>Currently it complains it can't execute a script.
>
>C:\users\stuart> perl -S foo.pl"
>Can't execute c:\users\stuart\bin/foo.pl.
>
>Should it really care? Shouldn't it just find the script and read
>the lines.
>
>Just typing foo.pl does work ( But then I can't pass command line
>args :-( ).
>
>Is it me, or is this whole start up issue on NT bogus? The pl2bat is a
>lucky hack, and the .pl=perl association only half works. I just want
>to startup my scripts and pass command line arguments. Why all the
>hassle? (Just Venting)
>
>Thanks,
> Stuart
>
>+---------------------------------------+-----------------------------------+
>| Stuart Poulin | Phone: 206 882 5211 (Direct) |
>| Applied Microsystems Corporation | 206 882 2000 |
>| 5020 148th Ave NE | Email: stuart@amc.com |
>| Redmond WA 98073 | WWW: http://www.amc.com |
>+---------------------------------------+-----------------------------------+
>#
>
>
>
--~--~--~--~-- hi mom! -~--~--~--~--~--~--~--~--~
mailto:Dick_Hardt@hip.com fax: 604.654.9881
http://info.hip.com/info me: 604.685.0124
hip communications inc.
350 - 1122 Mainland Street, Vancouver BC, V6B 5L1
RE: The -S switch and associations. [ In reply to ]
Ok, this is an old story, but I think I have more input.

First, this is Windows NT 3.51 (Service Pack 2) and Perl Version 5
Release 100 Beta 2 (according to "release.txt") built from source
(with VC++4.0 if that matters).

As Stuart Poulin reported below, using an association (assoc .pl=perl)
perl still can't run a ".pl" script because it reports it as being not
executable:

> >C:\users\stuart> perl -S foo.pl"
^
|__
(sic)
> >Can't execute c:\users\stuart\bin/foo.pl.

The problem lies with the function "cando" in doio.cpp and Microsoft C
library stat() function: only files with certain extensions have their
execute bit set in the 'struct stat' returned by stat(). The
documentation of '_stat' in VC++4.0 doesn't mention wich extensions
these are, but according to the comment in doio.cpp, they are "exe",
"com" and "bat".

At least when your filesystem is NTFS, you can set the execution bit
on a file-by-file basis.

Maybe the NT port of perl could get around Microsoft C library stat()
and explicitly check for the execution bit ?


Dick Hardt writes:
> Micorsoft said they will "fix" the shell in the next release of NT so that
> associations work correctly.
>
> -- Dick
>
> At 01:19 AM 11/10/95 UT, Ralph Shillington wrote:
> >It would seem to my that we remain a victim of vestiges of DOS. This makes
> >life really difficult for those of us trying to rationalize using NT as a WWW
> >server platform. Am As a Microsoft SP my hand are tied but one could always
> >hope for fully support alternative shell to cmd.
> >
> >Cheers
> >Ralph Shillington
> >
> >----------
> >From: owner-ntperl@mail.hip.com on behalf of Stuart Poulin
> >Sent: Thursday, November 09, 1995 1:01 PM
> >To: ntperl@mail.hip.com
> >Subject: The -S switch and associations.
> >
> >Will the next release of Perl for Win32 support the associations
> >(assoc .pl=perl) with the -S switch?
> >
> >Currently it complains it can't execute a script.
> >
> >C:\users\stuart> perl -S foo.pl"
> >Can't execute c:\users\stuart\bin/foo.pl.
> >
> >Should it really care? Shouldn't it just find the script and read
> >the lines.
> >
> >Just typing foo.pl does work ( But then I can't pass command line
> >args :-( ).
> >
> >Is it me, or is this whole start up issue on NT bogus? The pl2bat is a
> >lucky hack, and the .pl=perl association only half works. I just want
> >to startup my scripts and pass command line arguments. Why all the
> >hassle? (Just Venting)
> >
> >Thanks,
> > Stuart
> >
> >+---------------------------------------+-----------------------------------+
> >| Stuart Poulin | Phone: 206 882 5211 (Direct) |
> >| Applied Microsystems Corporation | 206 882 2000 |
> >| 5020 148th Ave NE | Email: stuart@amc.com |
> >| Redmond WA 98073 | WWW: http://www.amc.com |
> >+---------------------------------------+-----------------------------------+
> >#
> >
> >
> >
> --~--~--~--~-- hi mom! -~--~--~--~--~--~--~--~--~
> mailto:Dick_Hardt@hip.com fax: 604.654.9881
> http://info.hip.com/info me: 604.685.0124
> hip communications inc.
> 350 - 1122 Mainland Street, Vancouver BC, V6B 5L1

--
Marc Paquette | Marc.Paquette@Softimage.COM
Administrateur de Systemes / Sysadmin | Softimage Inc
tel: (514) 845-1636 ext. 3426 | 3510 Boulevard St-Laurent
fax: (514) 845-5676 | Montreal (Quebec) H2X 2V2