[8322] in Perl-Users-Digest
Perl-Users Digest, Issue: 1939 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 20 09:09:02 1998
Date: Fri, 20 Feb 98 06:01:30 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 20 Feb 1998 Volume: 8 Number: 1939
Today's topics:
An easy question or two <amylynne@shadow.net>
ANNOUNCE: App::Config v1.3 (Andy Wardley)
ANNOUNCE: Class::Singleton released (Andy Wardley)
ANNOUNCE: Class::Singleton v1.1 (Andy Wardley)
ANNOUNCE: DBD::XBase 0.058 uploaded to CPAN (Honza Pazdziora)
ANNOUNCE: libwin32 version 0.10 released (Gurusamy Sarathy)
ANNOUNCE: Text::MetaText v0.15 (Andy Wardley)
Re: any NT admin scripts to share (Clay Irving)
Attatching files with sendmail <billy@net7.co.uk>
Re: Avoiding $` (Tom Grydeland)
DBD/oracle, and LD_LIBRARY_PATH (T.J. Nijweide)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 20 Feb 1998 06:49:36 -0500
From: Amy Hartman <amylynne@shadow.net>
Subject: An easy question or two
Message-Id: <34ED6DD0.3DADBE15@shadow.net>
Sorry for the newbie questions; I'm still learning all the intricacies
of Perl.
1) Is there any way for Perl to modify an already existing form that is
being displayed on a web browser? (without rewriting the whole page)
ie. a form field says "John" and you want Perl to change it to "Jane"
without just a complete rewrite of the file.
2) Is there any way for Perl to pass variables to Javascript? On the
same token, how does Perl set or change cookies?
Thanx for all the help in advance
Amy
------------------------------
Date: 20 Feb 1998 12:56:09 GMT
From: abw@cre.canon.co.uk (Andy Wardley)
Subject: ANNOUNCE: App::Config v1.3
Message-Id: <6cjuh9$me4$1@news1.teleport.com>
My App::Config module has made it up to CPAN. It's been listed in the
modules list for a while now, and is now available for download.
App:: General application development tools
::Config bdpO Configuration file management ABW +
NAME
App::Config - Perl5 extension for managing global application
configuration information.
OVERVIEW
App::Config is a Perl5 module to handle global configuration
variables for perl programs. The advantages of using such a
module over the standard "global variables" approach include:
* Reduction of clutter in the main namespace.
* Default values can be specified.
* Multiple names (aliases) can refer to the same variable.
* Configuration values can be set directly from config files
and/or command line arguments.
* Data values can be automatically validated by pattern matching
(e.g. "\d+" to accept digits only) or through user-supplied
routines.
* User-defined routines can be called automatically when
configuration values are changed.
PREREQUISITES
App::Config requires Perl version 5.004 or later. If you have an
older version of Perl, please upgrade to latest version. Perl
5.004 is known to be stable and includes new features and bug
fixes over previous versions. Perl itself is available from your
nearest CPAN site (see http://www.perl.com/CPAN).
INSTALLATION
To install this module type the following:
perl Makefile.PL
make
make install
This will copy App::Config.pm to your perl library directory for
use by all perl scripts. You will probably need root access to
do this. You can now load the App::Config module into your Perl
scripts with the line:
use App::Config;
If you don't have sufficient privileges to install
App::Config.pm in the Perl library directory, you can prefix all
Perl scripts that call it with a line of the form:
use lib '/user/abw/lib/perl5'; # wherever you put App::Config.pm
use App::Config;
--
Andy Wardley <abw@kfs.org> http://www.kfs.org/~abw
Signature lost in transit. We apologise for any inconvenience caused.
------------------------------
Date: 20 Feb 1998 12:55:40 GMT
From: abw@cre.canon.co.uk (Andy Wardley)
Subject: ANNOUNCE: Class::Singleton released
Message-Id: <6cjugc$mdo$1@news1.teleport.com>
Announcing the release of the Class::Singleton module. Available from
CPAN just as soon as it's mirrored.
README attached below.
A
NAME
Class::Singleton - Implementation of a "Singleton" class
SYNOPSIS
use Class::Singleton;
my $one = Class::Singleton->instance(); # returns a new instance
my $two = Class::Singleton->instance(); # returns same instance
DESCRIPTION
This is the Class::Singleton module. A Singleton describes an
object class that can have only one instance in any system. An
example of a Singleton might be a print spooler or system
registry. This module implements a Singleton class from which
other classes can be derived. By itself, the Class::Singleton
module does very little other than manage the instantiation of a
single object. In deriving a class from Class::Singleton, your
module will inherit the Singleton instantiation method and can
implement whatever specific functionality is required.
For a description and discussion of the Singleton class, see
"Design Patterns", Gamma et al, Addison-Wesley, 1995, ISBN 0-
201-63361-2.
PREREQUISITES
Class::Singleton requires Perl version 5.004 or later. If you
have an older version of Perl, please upgrade to latest version.
Perl 5.004 is known to be stable and includes new features and
bug fixes over previous versions. Perl itself is available from
your nearest CPAN site (see INSTALLATION below).
INSTALLATION
The Class::Singleton module is available from CPAN. As the
'perlmod' man page explains:
CPAN stands for the Comprehensive Perl Archive Network.
This is a globally replicated collection of all known Perl
materials, including hundreds of unbunded modules.
[...]
For an up-to-date listing of CPAN sites, see
http://www.perl.com/perl/ or ftp://ftp.perl.com/perl/ .
The module is available in the following directories:
/modules/by-module/Class/Class-Singleton-<version>.tar.gz
/authors/id/ABW/Class-Singleton-<version>.tar.gz
For the latest information on Class-Singleton or to download the
latest pre-release/beta version of the module, consult the
definitive reference:
http://www.kfs.org/~abw/perl/
Class::Singleton is distributed as a single gzipped tar archive
file:
Class-Singleton-<version>.tar.gz
Note that "<version>" represents the current version number, of
the form "1.23". See the REVISION manpage below to determine the
current version number for Class::Singleton.
Unpack the archive to create an installation directory:
gunzip Class-Singleton-<version>.tar.gz
tar xvf Class-Singleton-<version>.tar
'cd' into that directory, make, test and install the module:
cd Class-Singleton-<version>
perl Makefile.PL
make
make test
make install
The 'make install' will install the module on your system. You
may need root access to perform this task. If you install the
module in a local directory (for example, by executing "perl
Makefile.PL LIB=~/lib" in the above - see `perldoc MakeMaker'
for full details), you will need to ensure that the PERL5LIB
environment variable is set to include the location, or add a
line to your scripts explicitly naming the library location:
use lib '/local/path/to/lib';
USING THE CLASS::SINGLETON MODULE
To import and use the Class::Singleton module the following line
should appear in your Perl script:
use Class::Singleton;
The instance() method is used to create a new Class::Singleton
instance, or return a reference to an existing instance. Using
this method, it is only possible to have a single instance of
the class in any system.
my $highlander = Class::Singleton->instance();
Assuming that no Class::Singleton object currently exists, this
first call to instance() will create a new Class::Singleton and
return a reference to it. Future invocations of instance() will
return the same reference.
my $macleod = Class::Singleton->instance();
In the above example, both $highlander and $macleod contain the
same reference to a Class::Singleton instance. There can be only
one.
DERIVING SINGLETON CLASSES
A module class may be derived from Class::Singleton and will
inherit the instance() method that correctly instantiates only
one object.
package PrintSpooler;
use vars qw(@ISA);
@ISA = qw(Class::Singleton);
# derived class specific code
sub submit_job {
...
}
sub cancel_job {
...
}
The PrintSpooler class defined above could be used as follows:
use PrintSpooler;
my $spooler = PrintSpooler->instance();
$spooler->submit_job(...);
The Class::Singleton instance() method uses a package variable
to store a reference to any existing instance of the object.
This variable, "_instance", is coerced into the derived class
package rather than the base class package.
Thus, in the PrintSpooler example above, the instance variable
would be:
$PrintSpooler::_instance;
This allows different classes to be derived from
Class::Singleton that can co-exist in the same system, while
still allowing only one instance of any one class to exists. For
example, it would be possible to derive both 'PrintSpooler' and
'Registry' from Class::Singleton and have a single instance of
*each* in a system, rather than a single instance of *either*.
Note that the _instance variable is considered private and is
not intended to be manipulated directly. The _instance_var()
method is provided for derived classes to access the variable.
It returns a reference to the variable in the correct package.
When no previous instance of the class exists, the value of the
variable referenced will be undefined (undef).
Consider a case where a Singleton class requires some
initialization process. The initialization code should be
executed one and only once when the sole instance is created.
The Class::Singleton instance() method can be overloaded in the
following way to acheieve this. Note the use of _instance_var()
to gain access to the instance variable, and the calling of the
base class instance() method to create the object instance.
package PrintSpooler;
use vars qw(@ISA);
@ISA = qw(Class::Singleton);
sub instance {
my $self = shift;
my $class = ref($self) || $self;
# get a reference to the instance variable
my $instvar = #self->_instance_var();
# see if an instance is defined
if (defined($$instvar)) {
$self = $$instvar;
}
else {
# call base class instance() constructor
$self = $self->SUPER::instance();
# call any initialization code
$self->initialize(@_);
}
return $self;
}
By coercing the instance variable into the derived class package
it is possible to have many classes derived from
Class::Singleton that each can have one and only once instance.
However, there may be times when there should be only one
instance of one or more derived classes.
Returning to the print spooler example, we know that only one
print spooler can be defined in a system. We may have defined a
number of different print spoolers classes, any one of which can
be instantiated and used. From that point on, it should not be
possible to create any other PrintSpooler or derived class.
This can be acheived by deriving all mutually exclusive classes
from a common base class. The base class instance() method
should be overload as follows:
package PrintSpooler;
use vars qw(@ISA);
@ISA = qw(Class::Singleton);
sub instance {
my $self = shift;
my $class = ref($self) || $self;
# create a temporary $self instance blessed into a
# common 'PrintSpooler' class
$self = bless {}, 'PrintSpooler';
# all derived classes now look like a 'PrintSpooler'
# when they call Class::Singleton->instance())
$self = $self->SUPER::instance();
# now bless returned instance into the required class
bless $self, $class;
}
Using this approach, only one instance of *any* class derived
from PrintSpooler will be instantiated.
package PrintSpoolerOne;
use vars qw(@ISA);
@ISA = qw(PrintSpooler);
package PrintSpoolerTwo;
use vars qw(@ISA);
@ISA = qw(PrintSpooler);
package main;
my $spooler1 = PrintSpoolerOne->instance();
my $spooler2 = PrintSpoolerTwo->instance();
In the above code, both $spooler1 and $spooler2 will reference
the same hash, although they will be blessed into their
respective PrintSpoolerOne and PrintSpoolerTwo classes.
AUTHOR
Andy Wardley, `<abw@cre.canon.co.uk>'
SAS Group, Canon Research Centre Europe Ltd.
REVISION
$Revision: 1.1 $
COPYRIGHT
Copyright (C) 1998 Canon Research Centre Europe Ltd. All Rights
Reserved.
This module is free software; you can redistribute it and/or
modify it under the term of the Perl Artistic License.
SEE ALSO
Andy Wardley's Home Page
http://www.kfs.org/~abw/
The SAS Group Home Page
http://www.cre.canon.co.uk/sas.html
The research group at Canon Research Centre Europe
responsible for development of Class::Singleton and similar
tools.
Design Patterns
Class::Singleton is an implementation of the Singleton class
described in "Design Patterns", Gamma et al, Addison-Wesley,
1995, ISBN 0-201-63361-2
--
Andy Wardley <abw@kfs.org> http://www.kfs.org/~abw
Signature lost in transit. We apologise for any inconvenience caused.
------------------------------
Date: 20 Feb 1998 12:57:34 GMT
From: abw@cre.canon.co.uk (Andy Wardley)
Subject: ANNOUNCE: Class::Singleton v1.1
Message-Id: <6cjuju$mi4$1@news1.teleport.com>
Announcing the release of Class::Singleton v1.1 available now from CPAN.
Class::
::Singleton bdp0 Implementation of a "Singleton" class
NAME
Class::Singleton - Implementation of a "Singleton" class
SYNOPSIS
use Class::Singleton;
my $one = Class::Singleton->instance(); # returns a new instance
my $two = Class::Singleton->instance(); # returns same instance
DESCRIPTION
This is the Class::Singleton module. A Singleton describes an
object class that can have only one instance in any system. An
example of a Singleton might be a print spooler or system
registry. This module implements a Singleton class from which
other classes can be derived. By itself, the Class::Singleton
module does very little other than manage the instantiation of a
single object. In deriving a class from Class::Singleton, your
module will inherit the Singleton instantiation method and can
implement whatever specific functionality is required.
For a description and discussion of the Singleton class, see
"Design Patterns", Gamma et al, Addison-Wesley, 1995, ISBN 0-
201-63361-2.
PREREQUISITES
Class::Singleton requires Perl version 5.004 or later. If you
have an older version of Perl, please upgrade to latest version.
Perl 5.004 is known to be stable and includes new features and
bug fixes over previous versions. Perl itself is available from
your nearest CPAN site (see INSTALLATION below).
INSTALLATION
The Class::Singleton module is available from CPAN. As the
'perlmod' man page explains:
CPAN stands for the Comprehensive Perl Archive Network.
This is a globally replicated collection of all known Perl
materials, including hundreds of unbunded modules.
[...]
For an up-to-date listing of CPAN sites, see
http://www.perl.com/perl/ or ftp://ftp.perl.com/perl/ .
The module is available in the following directories:
/modules/by-module/Class/Class-Singleton-<version>.tar.gz
/authors/id/ABW/Class-Singleton-<version>.tar.gz
For the latest information on Class-Singleton or to download the
latest pre-release/beta version of the module, consult the
definitive reference:
http://www.kfs.org/~abw/perl/
Class::Singleton is distributed as a single gzipped tar archive
file:
Class-Singleton-<version>.tar.gz
Note that "<version>" represents the current version number, of
the form "1.23". See the REVISION manpage below to determine the
current version number for Class::Singleton.
Unpack the archive to create an installation directory:
gunzip Class-Singleton-<version>.tar.gz
tar xvf Class-Singleton-<version>.tar
'cd' into that directory, make, test and install the module:
cd Class-Singleton-<version>
perl Makefile.PL
make
make test
make install
The 'make install' will install the module on your system. You
may need root access to perform this task. If you install the
module in a local directory (for example, by executing "perl
Makefile.PL LIB=~/lib" in the above - see `perldoc MakeMaker'
for full details), you will need to ensure that the PERL5LIB
environment variable is set to include the location, or add a
line to your scripts explicitly naming the library location:
use lib '/local/path/to/lib';
--
Andy Wardley <abw@kfs.org> http://www.kfs.org/~abw
Signature lost in transit. We apologise for any inconvenience caused.
------------------------------
Date: 20 Feb 1998 13:03:28 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: ANNOUNCE: DBD::XBase 0.058 uploaded to CPAN
Message-Id: <6cjuv0$mo4$1@news1.teleport.com>
Hello,
the URL
http://www.fi.muni.cz/~adelton/perl/DBD-XBase-0.058.tar.gz
has entered CPAN as
file: $CPAN/authors/id/JANPAZ/DBD-XBase-0.058.tar.gz
size: 29049 bytes
md5: 2d2ee65686642316f8a3934930fb09f3
A package to read and write dbf, dbt and ftp files, both direct
interface (get_record($recno)) and DBI driver (select * from table).
Since the last public release 0.039 there are some significant
changes: except bug fixes in the core XBase.pm it's the DBD driver.
I have come to a fairly general parser (to be found in XBase::SQL)
during the time, and it should allow easier modifications according to
the standards. At present, select, delete, insert, update and create
table commands are recognized and supported by DBD::XBase. No
bind_params yet but I hope to add them soon.
I will take a rest with new versions for a while, wait for possible
bug reports concerning the core XBase.pm (which I believe is rather
stable now) and study the DBI 0.92 to make DBD::XBase compliant.
I will appreciate any comments about the module (both XBase and
DBD::XBase), so if you have a little time, try to use it and tell me
what you think. The DBD::XBase is not ready yet but you can always
check the source to see if the problem you experience is a bug or an
not-yet-supported feature.
The README will be on CPAN, so here I include the changelog since 0.039:
XBase::SQL rewritten, DBD::XBase now supports select, delete,
insert, update and create table. Documentation for DBD::XBase
extended. DBD::XBase is still alpha, now my effort will go to
support everything that DBI 0.92 requires.
Added support for fpt memo files.
Fixed bug with dBase IV memo files, the block length is stored
somewhere else, patch by James LewisMoss. Fixed bug with field
names in newer dbf files, terminated by zero byte, patch by Petr
Olsak. Added binmode for the OSes that write to disk something
else that they are told to, reported by Robert Bauer. Removed
the test that caused read to fail on read-only files, reported
by Stewart Russell. Fixed bug on reading floating values,
spotted by Carlos Augusto de Almeida.
The error handling reviewed, most of the error messages are
now local to the object ($table->errstr()).
Enjoy and let me know about both positive and negative results,
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: 20 Feb 1998 13:02:50 GMT
From: gsar@engin.umich.edu (Gurusamy Sarathy)
Subject: ANNOUNCE: libwin32 version 0.10 released
Message-Id: <6cjutq$mk8$1@news1.teleport.com>
A new version of libwin32 is making its way into the CPAN.
This version features precompiled binaries for x86, and is
available in both tar.gz and zip formats.
http://www.perl.com/CPAN/authors/id/GSAR/libwin32-0.10.tar.gz
http://www.perl.com/CPAN/authors/id/GSAR/libwin32-0.10.zip
The README from the distribution follows.
Just give it,
- Sarathy.
gsar@umich.edu
--------------------------------------------------------------------------
Welcome to libwin32 version 0.10.
WHAT
----
This is a bundle of "Win32-only" extensions that provides a quick migration
path for people wanting to use the core support for win32 in perl 5.004
and later. It features the complete set of Win32-specific extensions
available from CPAN that could previously only be used with Activeware's
"Perl for Win32"(TM).
Most other non-Win32 extensions should build fairly smoothly using
the MakeMaker support available in perl 5.004 and later, so they are
not included in this bundle.
This distribution has been pre-compiled for the x86 architecture. See
the "WHAT TO DO" section for installation instructions.
WHAT HAS CHANGED
----------------
The top level "Changes" file contains a version by version overview of
the most significant changes.
This release has the following changes over the previous one:
+ Chris Madsen <ac608@yfn.ysu.edu> has rethought and rewritten the IPC
related modules. The Win32::Event module is new. In his own words:
The Win32::IPC modules
Win32::ChangeNotify
Win32::Event
Win32::IPC
Win32::Mutex
Win32::Semaphore
have been almost completely rewritten and are now at version 1.00.
The rather inconsistent ActiveWare interface is still supported, but
you should really use the newer and more powerful interface (using
lower case method names).
Consult the documentation for each module for details on how to
convert from the old interface.
In addition, Win32::Process has been slightly altered to work with
Win32::IPC. Process objects should now work with Win32::IPC's wait_*
functions (they were supposed to work before, but they didn't). You
will have to load Win32::IPC yourself, because Win32::Process does
not.
+ Yet more OLE fixes from Jan Dubois <jan.dubois@ibm.net>.
+ NetAdmin enhancements from Jutta Klebe <jmk@exc.bybyte.de>
+ Updated FileSecurity to base version 0.67.
+ Win32::Registry sports additional functions that correspond to the
Win32 Registry API functions.
+ Misc. changes
- fixed buggy InitiateSystemShutdown()
- New compatibility XSUBs: MsgBox(), LoadLibrary(), FreeLibrary(),
GetProcAddress(), RegisterServer(), UnregisterServer()
+ Other minor bugs have been fixed. See "Changes" files in individual
module subdirectories.
Many thanks to all the contributors.
WHAT IT HAS
-----------
This bundle contains:
* The collection of modules originally distributed by the Activeware
folks as part of their "Perl for Win32"(TM) port. These have been
modified so that they will build under MakeMaker using perls greater
than 5.004 and Visual C++. Along the way, I have added many
bugfixes to make these modules work correctly.
The complete list of Activeware extensions is available:
Win32/ChangeNotify
Win32/EventLog
Win32/File
Win32/FileSecurity
Win32/IPC
Win32/Mutex
Win32/NetAdmin
Win32/NetResource
Win32/OLE
Win32/Process
Win32/Registry
Win32/Semaphore
Win32/Service
Win32/WinError
Note this covers all of the Win32 extensions distributed by
Activeware (as of build 315).
These extensions have been re-engineered to use the XS interface
language, yet the changes are compatible with the originals. This
should minimize any problems for people wanting to migrate their
application to 5.004. The design of these modules is subject to
change in future.
The only deliberately incompatible change is in the Win32::OLE
module. While the Activeware port used the "OLE::" and "Win32::"
namespaces for the functionality contained in this module, this
port uses "Win32::OLE::" consistently. For a list of other
incompatibilities in Win32::OLE, see the embedded documentation
in "OLE/OLE.pm".
* The following five modules maintained by Aldo Calpini
<dada@divinf.it>:
Win32/Clipboard
Win32/Console
Win32/Internet
Win32/Shortcut
Win32/Sound
These also have been converted back to XS. I have added
bug fixes as I found them during the conversion process.
* Two useful modules maintained by Dave Roth <rothd@roth.net>.
Win32/ODBC
Win32/Pipe
These have only received just the bare modifications needed to
build them under MakeMaker. *.xs are really C/C++ files
masquerading as XS. Win32/ODBC hasn't been tested much.
WHAT TO DO
----------
You can either use the binaries that come with this distribution,
or choose to recompile them from scratch (recommended if you have
a C compiler that is capable of building perl).
If you want to use the precompiled binaries:
+ Download:
http://www.perl.com/CPAN/authors/id/GSAR/perl5.00402-bindist04-bc.zip
Unzip that, thoroughly read the README file, and install it. Note that
the it comes with an older version of libwin32, but you'll be
completely replacing that in the next few steps.
+ Make sure the newly installed perl is available from the command line.
Typing "perl -v" should report version 5.004_02. If not, make sure
you've added the installed location of perl.exe to your PATH correctly.
+ cd to wherever you uncompressed this distribution, and type
"install.bat". This should take care of installing everything in the
right place.
+ Many modules come with their own test files. You may want to
use them as a source of examples. Many of the test files will
only run on Windows NT, others may require Windows NT 4.0, and
still others may require Administrator privileges, or a full
fledged Windows network.
The following applies only if you want to rebuild using your C compiler.
Otherwise, skip to the next section.
This set of modules will build with perl5.004_01 and later on the Windows
NT platform. Building on Windows 95 is not supported (but it may be
possible if you use the 4DOS command shell, but YMMV).
+ First you need to build perl 5.004_01 or later (you will need
either Visual C++ 4.x+ or Borland C++ 5.02+), and install it. See
README.win32 in the perl distribution for details on how to build
perl for the Win32 platform.
+ That done, you need to extract this distribution into an NTFS
partition (the tests in the FileSecurity module and Net* modules
will fail otherwise). The testsuite for OLE needs Excel to
run. NetAdmin will only work if you have some kind of
live network connection, and are in a domain with a properly
configured domain controller. NetResource requires that you
be part of a domain or workgroup. You may also need
Administrator privileges for running some of the tests.
If one or more of these conditions will not be met, you may
wish to build in the subdirectories one by one. The steps
below will work either at the toplevel directory, or in each
of the individual extension subdirectories.
+ You need either MS Visual C++ (NetAdmin needs ver. 4.x+, Internet
needs ver. 5.0. ver. 2.0 should suffice for the others) or
Borland C++ 5.02. Make sure you have the full installation of
either of these compilers ("Minimal" installations or CDROM-based
installations may have problems finding all the libraries).
+ If the Internet extension doesn't build due to lack of libraries
(the wininet.h header is included), fetch the libraries from
Aldo Calpini's website: "http://www.divinf.it/dada/perl/internet/".
Look for a file named "WinInet.zip". If the wininet.h or wininet.dll
in your system are newer than the ones in WinInet.zip, discard them
before copying WinInet.lib into the Internet/ directory.
+ Remove the 'blib' directory (it contains the precompiled binaries)
+ perl Makefile.PL [either at toplevel or in subdirs]
+ $MAKE [either at toplevel or in subdirs]
+ $MAKE test [optional, some interactive tests]
+ $MAKE install [either at toplevel or in subdirs]
$MAKE above stands for either "dmake" or "nmake" depending on your
available compiler, and perl configuration.
WHAT THEN
---------
A brief statment of intent: I am doing this to ease the transition
for many people who may wish to start using the latest perl on win32
platforms. Long term development of these modules remains the
responsibility of the respective authors.
I wish to thank the authors of these modules for their effort in making
them useful, and for making them freely available.
If you find any problems with these modules, kindly report them to
me. While I have fixed many problems in these modules, I may also have
introduced brand new bugs in the process :)
Suggestions, patches, testsuite additions, wholesale rewrites and
additional ports of modules welcome.
Enjoy!
Gurusamy Sarathy
gsar@umich.edu
6 February 1998
WHATEVER
--------
Copyright for many of the modules is held by their respective authors.
Look in the module subdirectories for any conditions of use.
The following copyright applies to all files that don't have an explicit
copyright statement:
(c) 1995 Microsoft Corporation. All rights reserved.
Developed by ActiveWare Internet Corp., http://www.ActiveWare.com
Other modifications (c) 1997 by Gurusamy Sarathy <gsar@umich.edu>
You may distribute under the terms of either the GNU General Public
License or the Artistic License, as specified in the README file
of the Perl distribution.
------------------------------
Date: 20 Feb 1998 12:56:37 GMT
From: abw@cre.canon.co.uk (Andy Wardley)
Subject: ANNOUNCE: Text::MetaText v0.15
Message-Id: <6cjui5$me5$1@news1.teleport.com>
Announcing the release of Text::MetaText. Available now from CPAN.
Text::
::MetaText bdp0 Text processing/markup meta-language
NAME
Text::MetaText - Perl extension implementing meta-language for
processing "template" text files.
DESCRIPTION
MetaText is a text processing and markup meta-language which can
be used for processing "template" files. This module is a Perl 5
extension implementing a MetaText object class which processes
text files, interpreting and acting on the embedded MetaText
directives within.
Like a glorified pre-processor, MetaText can; include files,
define and substitute variable values, execute conditional
actions based on variables, call other perl functions or object
methods and capture the resulting output back into the document,
and more. It can format the resulting output of any of these
operations in a number of ways. The objects, and inherently, the
format and symantics of the MetaText langauge itself, are highly
configurable.
MetaText was originally designed to aid in the creation of html
documents in a large web site. It remains well suited for this
and similar tasks, being able to create web pages (dynamically
or statically) that are consistent with each other, yet easily
customisable:
* standard headers, footers and other elements can be defined in
separate files and then inserted into web documents:
%% INCLUDE header %%
* variables can be defined externally or from within a document,
then can be substituted back into the text. This is useful
for including your %% name %% or %% email %% address or any
other variable, and for encoding URL's or file paths that
can then be changed en masse. e.g.
<img src="%% imgroot %%/foo/bar.gif">
* conditional actions can be made based on variable definitions,
allowing easily and instantly customisable web pages. e.g
%% INCLUDE higraphics/header if="higfx && userid != abw" %%
* blocks of text can be internally defined simplifying the
creation of repetitive elements. e.g.
%% BLOCK table_row %%
<tr> <td>%% userid %%</td> <td>%% name %%</td> </tr>
%% ENDBLOCK %%
%% INCLUDE table_row userid=lwall name="Larry Wall" %%
%% INCLUDE table_row userid=tomc name="Tom Christiansen" %%
%% INCLUDE table_row userid=merlyn name="Randal L. Schwartz" %%
* in addition, the metapage utility is a script which can
automatically traverse document trees, processing updated
files to assist in web document management and other similar
tasks.
PREREQUISITES
MetaText requires Perl 5.004 or later. The Date::Format module
should also be installed. This is available from CPAN (in the
"TimeDate" distribution) as described in the following section.
OBTAINING AND INSTALLING THE METATEXT MODULE
The MetaText module is available from CPAN. As the 'perlmod' man
page explains:
CPAN stands for the Comprehensive Perl Archive Network.
This is a globally replicated collection of all known Perl
materials, including hundreds of unbunded modules.
[...]
For an up-to-date listing of CPAN sites, see
http://www.perl.com/perl/ or ftp://ftp.perl.com/perl/ .
Within the CPAN archive, MetaText is in the "Text::" group which
forms part of the the category:
*) String Processing, Language Text Processing,
Parsing and Searching
The module is available in the following directories:
/modules/by-module/Text/Text-MetaText-<version>.tar.gz
/authors/id/ABW/Text-MetaText-<version>.tar.gz
For the latest information on MetaText or to download the latest
pre-release/beta version of the module, consult the definitive
reference, the MetaText Home Page:
http://www.kfs.org/~abw/perl/metatext/
MetaText is distributed as a single gzipped tar archive file:
Text-MetaText-<version>.tar.gz
Note that "<version>" represents the current MetaText Revision
number, of the form "0.14". See the REVISION manpage below to
determine the current version number for Text::MetaText.
Unpack the archive to create a MetaText installation directory:
gunzip Text-MetaText-<version>.tar.gz
tar xvf Text-MetaText-<version>.tar
'cd' into that directory, make, test and install the MetaText
module:
cd Text-MetaText-<version>
perl Makefile.PL
make
make test
make install
The 't' sub-directory contains a number of small sample files
which are processed by the test script (called by 'make test').
See the README file in that directory for more information. A
logfile (test.log) is generated to report any errors that occur
during this process. Please note that the test suite is
incomplete and very much in an 'alpha' state. Any further
contributions here are welcome.
The 'make install' will install the module on your system. You
may need root access to perform this task. If you install the
module in a local directory (for example, by executing "perl
Makefile.PL LIB=~/lib" in the above - see `perldoc MakeMaker'
for full details), you will need to ensure that the PERL5LIB
environment variable is set to include the location, or add a
line to your scripts explicitly naming the library location:
use lib '/local/path/to/lib';
The metapage utility is a script designed to automate MetaText
processing of files. It can traverse directory trees, identify
modified files (by comparing the time stamp of the equivalent
file in both "source" and "destination" directories), process
them and direct the resulting output to the appropriate file
location in the destination tree. One can think of metapage as
the MetaText equivalent of the Unix make(1S) utility.
The installation process detailed above should install metapage
in your system's perl 'installbin' directory (try `perl '-
V:installbin'' to check this location). See the metapage
documentation (`perldoc metapage') for more information on
configuring and using metapage.
--
Andy Wardley <abw@kfs.org> http://www.kfs.org/~abw
Signature lost in transit. We apologise for any inconvenience caused.
------------------------------
Date: 20 Feb 1998 08:18:55 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: any NT admin scripts to share
Message-Id: <6cjvrv$6tg@panix.com>
In <6ciuc8$1gg$1@bombay.ziplink.net> "Fred Bickford (Ziplink)" <bickford@ziplink.net> writes:
>Does anyone have any good NT admin scripts for sharing, Im try to
>see if I can prove the usefulness of a couple of classes to management
http://reference.perl.com/query.cgi?windows
--
Clay Irving <clay@panix.com> I think, therefore I am. I think?
http://www.panix.com/~clay/
------------------------------
Date: Fri, 20 Feb 1998 12:34:36 +0000
From: Robert Barker <billy@net7.co.uk>
Subject: Attatching files with sendmail
Message-Id: <34ED785B.14CCB406@net7.co.uk>
Can u attatch files with sendmail???
I want the user to select a file a html pulldown menu, fill in their
email address and have the
file sent back to them.
Must be possible (and probably quite simple).
Thanks
--
Robert Barker
System's Development Manager
Net7 Limited
http://www.net7.co.uk/
Tel: +44 (0)1924 444007
Fax: +44 (0)1924 445507
dataTRAK - Net7's Java Meta-Search Engine:
http://datatrak.net7.co.uk
------------------------------
Date: 20 Feb 1998 12:52:43 GMT
From: Tom.Grydeland@phys.uit.no (Tom Grydeland)
Subject: Re: Avoiding $`
Message-Id: <slrn6eqv4r.7rg.Tom.Grydeland@mitra.phys.uit.no>
On 19 Feb 1998 23:05:13 -0500,
uri@sysarch.com <uri@sysarch.com> wrote:
> Joe Gottman <joegottman@nospam.worldnet.att.net> writes:
>
> > As most Perl hackers know, using $`, $&, or $' anywhere in a program
> > can result in an enormous performance hit. It is easy enough to get the
> > functionality of $& or $' by modifying the regular expression. If your
> > basic regular expression is /a+/, you can emulate $& by using /(a+)/ ,
> > and you can emulate $' by using /a+(?=(.*))/ (using positive lookahead
> > and saving the result, this is legal according to 'Mastering Regular
> > Expressions'). What is the best way of emulating $` ?
>
> why not just use
>
> /^(.+?)(a+)(.+?)$/
surely you mean
/^(.*?)(a+)(.*?)$/s
> Uri Guttman SYStems ARCHitecture and Software Engineering
--
//Tom Grydeland <Tom.Grydeland@phys.uit.no>
------------------------------
Date: 20 Feb 1998 09:57:58 GMT
From: tobias@socrates.et.tudelft.nl (T.J. Nijweide)
Subject: DBD/oracle, and LD_LIBRARY_PATH
Message-Id: <6cjk36$knl$1@delphi.et.tudelft.nl>
Hi,
I'm currently writing some scripts that use DBI and DBD::oracle. The
problem I have is that oracle needs libclntsh.so.1.0, but that is not
in the LD_LIBRARY_PATH for most users. I could of course write a wrapper
shell script but that's not elegant.
What I tried:
------------------
BEGIN {
$ENV{LD_LIBRARY_PATH} = "$ENV{LD_LIBRARY_PATH}:/.../\@sys/oracle/7.3.2/lib";
}
use DBI;
------------------
This doesn't really work. Is there any tricks I can use?
Tob
PS I use ancient versions of DBI and DBD, because of dependencies with
running software. I run perl 5.003.
--
======-------- Tobias J. Nijweide MESA Consulting B.V.
=======--------- ph. (+31)-15-2510733 P.O. Box 9
=======--------- tobias@mesa.nl 2270 AA Voorburg
__==== www.mesa.nl ---__U_n_i_x____I_n_t_e_r_n_e_t__ The Netherlands ____
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 1939
**************************************