ActiveState!

ActivePerl Documentation
Table of Contents

(Usage Statistics)
(about this ver)


* Getting Started
    * Welcome To ActivePerl
    * Release Notes
    * Readme
    * ActivePerl Change Log
* Install Notes
    * Linux
    * Solaris
    * Windows
* ActivePerl Components
    * Overview
    * PPM
    * Windows Specifics
       * OLE Browser
       * PerlScript
       * Perl for ISAPI
       * PerlEZ
* ActivePerl FAQ
    * Introduction
    * Availability & Install
    * Using PPM
    * Docs & Support
    * Windows Specifics
       * Perl for ISAPI
       * Windows 9X/NT/2000
       * Quirks
       * Web Server Config
       * Web programming
       * Programming
       * Modules & Samples
       * Embedding & Extending
       * Using OLE with Perl
* Windows Scripting
    * Active Server Pages
    * Windows Script Host
    * Windows Script Components

Core Perl Documentation


* perl
* perlfaq
* perltoc
* perlbook

* perlsyn
* perldata
* perlop
* perlreftut
* perldsc
* perllol

* perllexwarn
* perldebug

* perlrun
* perlfunc
* perlopentut
* perlvar
* perlsub
* perlmod
* perlpod

* perlstyle
* perlmodlib
* perlmodinstall
* perltrap
* perlport
* perlsec

* perlref
* perlre
* perlform
* perllocale
* perlunicode

* perlboot
* perltoot
* perltootc
* perlobj
* perlbot
* perltie

* perlipc
* perlnumber
* perlfork
* perlthrtut

* perldiag
* perlfaq1
* perlfaq2
* perlfaq3
* perlfaq4
* perlfaq5
* perlfaq6
* perlfaq7
* perlfaq8
* perlfaq9

* perlcompile

* perlembed
* perlxstut
* perlxs
* perlguts
* perlcall
* perlfilter
* perldbmfilter
* perlapi
* perlintern
* perlapio
* perltodo
* perlhack

* perlhist
* perldelta
* perl5005delta
* perl5004delta

* perlamiga
* perlcygwin
* perldos
* perlhpux
* perlmachten
* perlos2
* perlos390
* perlvms
* perlwin32

Pragmas


* attributes
* attrs
* autouse
* base
* blib
* bytes
* charnames
* constant
* diagnostics
* fields
* filetest
* integer
* less
* lib
* locale
* lwpcook
* open
* ops
* overload
* perllocal
* re
* sigtrap
* strict
* subs
* utf8
* vars
* warnings

Libraries


* ActivePerl
    * DocTools
        * TOC
            * RDF
* AnyDBM_File
* Archive
    * Tar
* AutoLoader
* AutoSplit
* B
    * Asmdata
    * Assembler
    * Bblock
    * Bytecode
    * C
    * CC
    * Debug
    * Deparse
    * Disassembler
    * Lint
    * Showlex
    * Stackobj
    * Terse
    * Xref
* Benchmark
* Bundle
    * LWP
* ByteLoader
* Carp
    * Heavy
* CGI
    * Apache
    * Carp
    * Cookie
    * Fast
    * Pretty
    * Push
    * Switch
* Class
    * Struct
* Compress
    * Zlib
* Config
* CPAN
    * FirstTime
    * Nox
* Cwd
* Data
    * Dumper
* DB
* Devel
    * DProf
    * Peek
    * SelfStubber
* Digest
    * HMAC
    * HMAC_MD5
    * HMAC_SHA1
    * MD2
    * MD5
    * SHA1
* DirHandle
* Dumpvalue
* DynaLoader
* English
* Env
* Errno
* Exporter
    * Heavy
* ExtUtils
    * Command
    * Embed
    * Install
    * Installed
    * Liblist
    * MakeMaker
    * Manifest
    * Miniperl
    * Mkbootstrap
    * Mksymlists
    * MM_Cygwin
    * MM_OS2
    * MM_Unix
    * MM_VMS
    * MM_Win32
    * Packlist
    * testlib
* Fatal
* Fcntl
* File
    * Basename
    * CheckTree
    * Compare
    * Copy
    * CounterFile
    * DosGlob
    * Find
    * Glob
    * Listing
    * Path
    * Spec
        * Functions
        * Mac
        * OS2
        * Unix
        * VMS
        * Win32
    * stat
* FileCache
* FileHandle
* FindBin
* Font
    * AFM
* Getopt
    * Long
    * Std
* HTML
    * AsSubs
    * Element
    * Entities
    * Filter
    * Form
    * FormatPS
    * Formatter
    * FormatText
    * HeadParser
    * LinkExtor
    * Parse
    * Parser
    * TokeParser
    * TreeBuilder
* HTTP
    * Cookies
    * Daemon
    * Date
    * Headers
        * Util
    * Message
    * Negotiate
    * Request
        * Common
    * Response
    * Status
* I18N
    * Collate
* IO
    * Dir
    * File
    * Handle
    * Pipe
    * Poll
    * Seekable
    * Select
    * Socket
        * INET
        * UNIX
* IPC
    * Msg
    * Open2
    * Open3
    * Semaphore
    * SysV
* LWP
    * Debug
    * MediaTypes
    * MemberMixin
    * Protocol
    * RobotUA
    * Simple
    * UserAgent
* Math
    * BigFloat
    * BigInt
    * Complex
    * Trig
* MD5
* MIME
    * Base64
    * QuotedPrint
* NDBM_File
* Net
    * Cmd
    * Config
    * Domain
    * DummyInetd
    * FTP
    * hostent
    * libnetFAQ
    * netent
    * Netrc
    * NNTP
    * PH
    * Ping
    * POP3
    * protoent
    * servent
    * SMTP
    * SNPP
    * Time
* O
* ODBM_File
* Opcode
* Pod
    * Checker
    * Find
    * Html
    * InputObjects
    * Man
    * Parser
    * ParseUtils
    * Plainer
    * Select
    * Text
        * Color
        * Termcap
    * Usage
* POSIX
* PPM
    * SOAPClient
    * SOAPServer
* Safe
* SDBM_File
* Search
    * Dict
* SelectSaver
* SelfLoader
* SHA
* Shell
* SOAP
    * Defs
    * Envelope
    * EnvelopeMaker
    * GenericHashSerializer
    * GenericInputStream
    * GenericScalarSerializer
    * Lite
    * OutputStream
    * Packager
    * Parser
    * Transport
        * HTTP
            * Apache
            * CGI
            * Client
            * Server
        * LOCAL
        * MAILTO
        * POP3
        * TCP
    * TypeMapper
* Socket
* Symbol
* Sys
    * Hostname
    * Syslog
* Term
    * ANSIColor
    * Cap
    * Complete
    * ReadLine
* Test
    * Harness
* Text
    * Abbrev
    * ParseWords
    * Soundex
    * Tabs
    * Wrap
* Thread
    * Queue
    * Semaphore
    * Signal
    * Specific
* Tie
    * Array
    * Handle
    * Hash
    * RefHash
    * Scalar
    * SubstrHash
* Time
    * gmtime
    * Local
    * localtime
    * tm
* UDDI
    * Lite
* UNIVERSAL
* URI
    * data
    * Escape
    * file
    * Heuristic
    * ldap
    * URL
    * WithBase
* User
    * grent
    * pwent
* Win32
    * AuthenticateUser
    * ChangeNotify
    * Clipboard
    * Console
    * Event
    * EventLog
    * File
    * FileSecurity
    * Internet
    * IPC
    * Mutex
    * NetAdmin
    * NetResource
    * ODBC
    * OLE
        * Const
        * Enum
        * NEWS
        * NLS
        * TPJ
        * Variant
    * PerfLib
    * Pipe
    * Process
    * Registry
    * Semaphore
    * Service
    * Sound
    * TieRegistry
* Win32API
    * File
    * Net
    * Registry
* WWW
    * RobotRules
        * AnyDBM_File
* XML
    * Element
    * Parser
        * Expat
    * PPD
    * PPMConfig
    * ValidatingElement
* XSLoader

 PerlScript


What is PerlScript?

PerlScript is an ActiveX scripting engine that allows you to use Perl with any ActiveX scripting host. At this time, ActiveX scripting hosts include:

  • Internet Information Server 3.0/4.0
  • Peer Web Services 3.0/4.0
  • Microsoft Internet Explorer 4.0x
  • Windows Scripting Host

What do I need to run PerlScript?

  • ActivePerl
  • an ActiveX scripting host (see above)
  • Windows NT/95
  • Perl scripts!

How do I install PerlScript?

When you launch the ActivePerl installer, PerlScript is one of the components you can optionally install. You must install, or have previously installed, ActivePerl to use PerlScript.


Why aren't my event handlers called?

Case sensitive lookup of event names may be being performed. Event name lookup can be made case insensitive by adding key

    HKEY_LOCAL_MACHINE\SOFTWARE\ActiveState\PerlSE\1.0
    REG_DWORD: NoCaseCompare = 1 (default)


What is Windows Script Host?

Microsoft advertises Windows Script Host, or WSH for short, as being "a language-independent scripting host for 32-bit Windows operating system platforms". WSH offers a lot to VBScript and JScript developers for whom console type programs have been traditionally difficult. For Perl Developers, however, the same functionality can be found with a Perl module or extension.

More information can be found in the Windows Script Host tutorial.


What do I need to write Active Server Pages with PerlScript?

Active Server Pages, or ASP for short, is a server-side technology that enables you to embed script commands within HTML. ActivePerl and PerlScript are required on the server that is providing the webpages, but the two are not required on the client; however, would you be developing Active Server Pages on your local machine, you are, of course, both the client and the server.

For a web server, Windows 95 users will need the Personal Web Server (PWS), which is freely downloadable as a component included in the NT Option Pack available from
Microsoft. Windows 98 users will need to either install it from the CD that comes with Windows 98 or download the NT Option pack. Windows NT/2000 users will either get it installed out of the box under the name Internet Information Services or need to install it off from the CD.

For more information about how to use the technology, see the Active Server Pages tutorial.


What can I do when PerlScript in ASP seems capsized in PWS?

There are three widely used solutions when PerlScript and ASP doesn't function the way it should in PWS. First, reboot the computer and see if it works; next, reinstall ActivePerl with PerlScript checked and see if it works; lastly, reinstall PWS if none of the above works. Oftentimes, when somebody has a problem with PWS, it is commonly asked if the person has set "scripts" permissions on the server so that a scripting language is enabled to run. PWS and IIS sets the majority, if not all, virtual directories to allow scripts by default, so do not worry yourself about that; instead, follow the guidelines laid out above.


What is Global.asa to ASP and PerlScript?

Global.asa is a file that exists for each IIS application. On PWS, there is only one IIS application while later versions of the IIS web-server supports many more IIS applications. Global.asa can be used to declare objects that are given either Session or Application scope within the web service. It must as a skeleton without code look as follows:

    <script language=perlscript runat=server>
    sub Application_OnStart {
    }

    sub Application_OnEnd {
    }

    sub Session_OnStart {
    }

    sub Session_OnEnd {
    }
    </script>
Then you can put code within the subroutines that creates variables, objects, and so forth. The subroutines, or events, will be called at their designated times: Session_OnStart when a new session is started, and its OnEnd event is run when the session is ended. The Application's start and end signifies the start and stop of the webserver.


Client-side PerlScript

Client-Side PerlScript has Perl embedded within your HTML documents. All PerlScript code must be contained within <SCRIPT LANGUAGE="PerlScript"> </SCRIPT>

Client-side PerlScript has the added requirement that both ActivePerl and PerlScript be installed on each computer will will be loading PerlScript pages.

Client-side Perlscript should only be used if you can control the ocnfiguration of the computers on which it will be run. If your goal is build an application which will be used by a large number users, Server-side PerlScript is considerably more practical.

To display something to the browser, use the write() method of the document object. You can use the write() method with $windows->document->write('any old text').

The sample below is another Hello World variation, but this time using client-side PerlScript:

    <HTML>
    <HEAD>
    <TITLE>PerlScript Hello World!</TITLE>
    </HEAD>
    <BODY BGCOLOR="#FFFFFF">
    <H1>PerlScript Hello world!</H1>
    <SCRIPT LANGUAGE="PerlScript">
    $window->document->write('Hello world!');
    </SCRIPT>
    </BODY>
    </HTML>


How can I configure client-side PerlScript security?

PerlScript in IE 4.0 and higher can be enabled/disabled by zones

    HKEY_LOCAL_MACHINE\SOFTWARE\ActiveState\PerlSE\1.0
    REG_DWORD: EnabledZones = 0x0010 (default)

Values

  • Enable All 0x0001
  • Enable Local 0x0010
  • Enable Internet 0x0020
  • Enable Trusted 0x0040
  • Enable Restricted 0x0080 (for the perverse)
IE3 is more limited; it is an all or nothing affair. For IE3 the only values recognized are

Values

  • Disable All 0x0000
  • Enable All 0x0001


Other References

Here's a short list of PerlScript FAQs available on the net:  

 PerlScript