SPUG: RE: PerlScript, IIS, and .NET

Marc M. Adkins Marc.M.Adkins at Doorways.org
Mon Jun 17 14:52:08 CDT 2002


> ...Perl works just fine even after you drink the Microsoft Kool-aid.

Was this a conscious reference to Jonestown?  ;)

I don't use PerlScript with IIS (I prefer using Apache, even on Windows),
but I have used it to control OLE-enabled applications (Excel, Word,
PowerPoint, IE) on a number of occasions.  My favorite down'n'dirty "GUI"
for a Perl application is to run an HTTP::Daemon loop and present web pages.
I have a bit of Perl code that pops up an IE window pointed to my little
server when the application starts.  It's a welcome alternative to VBA.

Just for grins I once wrote an ActiveX control in C++ that was configured to
be started by a Perl script and then passed the _same_ Perl script which it
started as a PerlEZ session with an argument (a "pointer" to the ActiveX
window) to specify a different execution mode.  It worked kind of like a
fork(), the top script ran the event-handling loop for the control and
handled user input and the inner script ran independently and controlled the
behavior of the ActiveX control, providing a slide show within the control.

And lest we forget, Perl provides an ample replacement for DOS batch
language (which is still the command shell for Windows!).  I'm aware of
DOS/Windows ports of *NIX shells.  There are so many...all a bit
different...not being primarily a *NIX programmer I lose track of which is
which.  Plus you have to have all the *NIX software tools to go along with
the shell or you can't do a whole lot.  But Perl is always Perl and CPAN
provides all the tools I need.

> And I don't know if you've ever sat through an introduction to .NET but so
> much of it sounds like it was modeled after Perl it can't be coincidence.

I find it amusing that Parrot and the .NET CLR seem to sit in the same
evolutionary niche, one step up from the Java runtime (which doesn't have
multiple language support, to my knowledge).  I suppose this isn't
accidental.  I'm privately rooting for Parrot to become the .NET killer
somewhere down the road.

I'm not sure what aspects of .NET seem modelled after Perl.  It's
language-independent, so syntax of any particular language (e.g. C#) doesn't
really count.  .NET is really about the class library and the CLR.  But I'm
open to convincing, it's an interesting thought.

> .NET, like JAVA and other very strict environments, imposes  limits that
> take away some of the flexibility of Perl, and I don't know if ActiveState
> will have the resources to do the work necessary for a seamless Perl.net
> port.  But in principle Perl should to be a more natural and useful .NET
> language port than VB!

Except for the distinction between a "method" and a "property."  These come
from COM/VB and never really corresponded to anything in any other language
except some arcane LISP development environments.  Remember Symbolics Lisp
and Flavors?  No?  Didn't think so.  Too bad, it was cool.

The big win with C# is that it is a C-family language which is compatible
with COM (and thus the CLR) so it is possible to use a C-like syntax
effectively with .NET.  Previously the choice was doing it easily and
quickly with VB or slowly and painfully with C++.

I'm curious about Perl.NET myself.  Anyone know anything about it?  That
might make a good SPUG meeting topic.  I don't suppose anyone would drive
down from Vancouver and do a presentation just for free beer.

I had someone tell me that with Perl.NET you can use .NET threads, with Perl
variables accessible from multiple threads, which I disbelieved.  But if
that were true...it would be a big deal.

Certainly regular expression handling is _much_ easier in Perl than in the
.NET model, which requires one to use hopelessly convoluted object
structures for anything more than a simple match.

mma


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org




More information about the spug-list mailing list