[23845] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 6048 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 29 22:47:01 2004

Date: Thu, 29 Jan 2004 19:41:21 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 29 Jan 2004     Volume: 10 Number: 6048

Today's topics:
    Re: submit stuff <tadmc@augustmail.com>
    Re: submit stuff <matthew.garrish@sympatico.ca>
    Re: submit stuff <trammell+usenet@hypersloth.invalid>
        Tcl style traces <nomail@hursley.ibm.com>
    Re: Tcl style traces <usenet@morrow.me.uk>
    Re: Tcl style traces (Malcolm Dew-Jones)
    Re: Tcl style traces <nomail@hursley.ibm.com>
    Re: Tcl style traces <lusol@Dragonfly.cc.lehigh.edu>
        Template Toolkit ... is there a bug in the ANYCASE sett (valued customer)
        test whether or not a web page work <bdu@iastate.edu>
    Re: test whether or not a web page work <spamtrap@dot-app.org>
    Re: test whether or not a web page work <gnari@simnet.is>
        The Perl Journal <perl@my-header.org>
    Re: The Perl Journal <bigiain@mightymedia.com.au>
    Re: The Perl Journal <perl@my-header.org>
        Top-Level Namespace Suggestion/Request: VirtualFS:: (Stevie-O)
    Re: Top-Level Namespace Suggestion/Request: VirtualFS:: <usenet@morrow.me.uk>
    Re: Top-Level Namespace Suggestion/Request: VirtualFS:: (Walter Roberson)
    Re: Top-Level Namespace Suggestion/Request: VirtualFS:: <spamblock@nodomain.nodomain.us>
    Re: Top-Level Namespace Suggestion/Request: VirtualFS:: (Walter Roberson)
    Re: Top-Level Namespace Suggestion/Request: VirtualFS:: (Stevie-O)
    Re: Top-Level Namespace Suggestion/Request: VirtualFS:: <spamblock@nodomain.nodomain.us>
        Unexpected result <edgrsprj@ix.netcom.com>
    Re: Unexpected result <usenet@morrow.me.uk>
    Re: Unexpected result <xx087@freenet.carleton.ca>
    Re: Unexpected result <edgrsprj@ix.netcom.com>
    Re: Unexpected result <edgrsprj@ix.netcom.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 19 Jan 2004 17:19:09 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: submit stuff
Message-Id: <slrnc0opfd.1k4.tadmc@magna.augustmail.com>

Robin <robin@csf.edu> wrote:

> one thing, what's file locking, how would one acomplish it?


The way that the Perl FAQ says to.


   perldoc -q "\block"


       How can I lock a file?

       Why can't I just open(FH, ">file.lock")?

       I still don't get locking.  I just want to increment the number
       in the file.  How can I do this?

       All I want to do is append a small amount of text to the end of
       a file.  Do I still have to use locking?


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Mon, 19 Jan 2004 18:17:57 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: submit stuff
Message-Id: <zAZOb.4854$rW5.198412@news20.bellglobal.com>


"John J. Trammell" <trammell+usenet@hypersloth.invalid> wrote in message
news:slrnc0o6pq.g4i.trammell+usenet@hypersloth.el-swifto.com.invalid...
>
> Then you'll understand my answer: STFW.
>

I think STFU, albeit a bit harsh, would also apply... : )

Matt




------------------------------

Date: Tue, 20 Jan 2004 01:34:28 +0000 (UTC)
From: "John J. Trammell" <trammell+usenet@hypersloth.invalid>
Subject: Re: submit stuff
Message-Id: <slrnc0p1d4.qd9.trammell+usenet@hypersloth.el-swifto.com.invalid>

On Mon, 19 Jan 2004 18:17:57 -0500, Matt Garrish  wrote:
> 
> I think STFU, albeit a bit harsh, would also apply... : )
> 

Search the Fine Usenet?  :^)



------------------------------

Date: Wed, 28 Jan 2004 10:18:33 +0800
From: Derek Fountain <nomail@hursley.ibm.com>
Subject: Tcl style traces
Message-Id: <40171bcc$0$1742$5a62ac22@freenews.iinet.net.au>

Does Perl have something similar to Tcl style tracing? That is, the ability
to call a subroutine when a variable is written to or read from?


------------------------------

Date: Wed, 28 Jan 2004 02:24:47 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Tcl style traces
Message-Id: <bv76hf$2bv$2@wisteria.csv.warwick.ac.uk>


Derek Fountain <nomail@hursley.ibm.com> wrote:
> Does Perl have something similar to Tcl style tracing? That is, the ability
> to call a subroutine when a variable is written to or read from?

perldoc perltie

Ben

-- 
"If a book is worth reading when you are six,                * ben@morrow.me.uk
it is worth reading when you are sixty." - C.S.Lewis


------------------------------

Date: 27 Jan 2004 18:42:57 -0800
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: Tcl style traces
Message-Id: <401721b1@news.victoria.tc.ca>

Derek Fountain (nomail@hursley.ibm.com) wrote:
: Does Perl have something similar to Tcl style tracing? That is, the ability
: to call a subroutine when a variable is written to or read from?

perldoc perltie 

(Not sure if the case is right)

Tie your variable to a routine that does anything you want.

The debugger may also already have a way to do this during a debug session 
(I have no idea if it does, it's just a thought).

CPAN has various "tie" related modules that might be worth looking at.




------------------------------

Date: Wed, 28 Jan 2004 11:33:10 +0800
From: Derek Fountain <nomail@hursley.ibm.com>
Subject: Re: Tcl style traces
Message-Id: <40172d47$0$1749$5a62ac22@freenews.iinet.net.au>

>> Does Perl have something similar to Tcl style tracing? That is, the
>> ability to call a subroutine when a variable is written to or read from?
> 
> perldoc perltie

Looks like just the thing, thanks.


------------------------------

Date: Wed, 28 Jan 2004 16:07:39 +0000 (UTC)
From: Steve Lidie <lusol@Dragonfly.cc.lehigh.edu>
Subject: Re: Tcl style traces
Message-Id: <bv8mob$mgi$1@fidoii.CC.Lehigh.EDU>

Derek Fountain <nomail@hursley.ibm.com> wrote:
> Does Perl have something similar to Tcl style tracing? That is, the ability
> to call a subroutine when a variable is written to or read from?


Tie::Watch on CPAN.


------------------------------

Date: 23 Jan 2004 01:46:38 -0800
From: scooterm@hotmail.com (valued customer)
Subject: Template Toolkit ... is there a bug in the ANYCASE setting??
Message-Id: <1b347673.0401230146.1bc163bd@posting.google.com>

The code snippet below produces an error "unexpected token (LAST)".
Changing the ANYCASE property to false (zero) removes the error and
the code behaves as expected.

The question is, is this a bug? According to the TT2 documentation,
the ANYCASE property has a side effect of precluding reserved words as
variable names, does this also preclude using the 'loop.last'
directive? Any TT2 experts out there? Tips? Suggestions? Thanks in
advance.

### INIT library
    use strict;
    use warnings;
    use Template;

### INIT variables
    my $tt =
    Template->new( { ANYCASE => 1,}) || die "$Template::ERROR\n";

### INIT Source Data
    my $data = { list => [ qw(one two three four five) ]};

### PROCESS TEMPLATE
    my $strOut;
    $tt->process(\*DATA, $data, \$strOut) || die $tt->error(), "\n";
    print $strOut;

__DATA__
[%-FOREACH item = list;
"<BEGIN>\n" IF loop.first;%]
[%- item  %]
[%"<END>" IF loop.last;
END;%]


------------------------------

Date: Wed, 28 Jan 2004 11:51:46 -0600
From: Bing Du <bdu@iastate.edu>
Subject: test whether or not a web page work
Message-Id: <bv8srn$i3e$1@news.iastate.edu>

Greetings,

How can I test if a web page (e.g. http://www.cpan.org) works or not in 
a Perl script?  If it returns normal contents, it's working fine.  If it 
gives errors (500, etc.), then it has some problems.  The results are 
obvious in browser.  Just wondering how to do that outside of web browsers.

Thanks in advance for any help,

Bing



------------------------------

Date: Wed, 28 Jan 2004 13:49:36 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: test whether or not a web page work
Message-Id: <GsSdnd3ZkP3dmYXdRVn-vA@adelphia.com>

Bing Du wrote:

> How can I test if a web page (e.g. http://www.cpan.org) works or not in
> a Perl script?  If it returns normal contents, it's working fine.  If it
> gives errors (500, etc.), then it has some problems.

Have a look at the LWP::UserAgent and/or LWP::Simple modules on CPAN. The
first is more flexible and powerful, while the second is (as its name
implies) a simpler but less flexible alternative.

sherm--




------------------------------

Date: Wed, 28 Jan 2004 18:29:34 -0000
From: "gnari" <gnari@simnet.is>
Subject: Re: test whether or not a web page work
Message-Id: <bv8v8b$6tk$1@news.simnet.is>

"Bing Du" <bdu@iastate.edu> wrote in message
news:bv8srn$i3e$1@news.iastate.edu...
> Greetings,
>
> How can I test if a web page (e.g. http://www.cpan.org) works or not in
> a Perl script?  If it returns normal contents, it's working fine.  If it
> gives errors (500, etc.), then it has some problems.  The results are
> obvious in browser.  Just wondering how to do that outside of web
browsers.
>
> Thanks in advance for any help,

perldoc LWP::Simple
perldoc LWP

gnari






------------------------------

Date: Wed, 28 Jan 2004 21:54:29 +0100
From: Matija Papec <perl@my-header.org>
Subject: The Perl Journal
Message-Id: <m38g10l4gp09hkunonq748s6ghgmadlebo@4ax.com>


http://www.tpj.com/101Perl.html

Can somebody send my table of contents? :)
tia



-- 
Matija


------------------------------

Date: Thu, 29 Jan 2004 10:36:56 +1100
From: Iain Chalmers <bigiain@mightymedia.com.au>
Subject: Re: The Perl Journal
Message-Id: <bigiain-634242.10365629012004@news.fu-berlin.de>

In article <m38g10l4gp09hkunonq748s6ghgmadlebo@4ax.com>,
 Matija Papec <perl@my-header.org> wrote:

> http://www.tpj.com/101Perl.html
> 
> Can somebody send my table of contents? :)

Its only ten bucks, just buy it!

:-)

big (and no, I won't send anyone any of the articles...)



BYTE 

Developing Applications in Perl by Tom Christiansen (April 1994) 
Textbase Tricks by Jon Udell (July 1997) 
Perl and Apache by Jon Udell (March 1998) 
Perltropolis by Dennis Watson (July 1999) 
First Steps With The Perl Database Interface by Dennis Watson (August 
1999) 
Perl To Delete Dead Bookmarks by Dennis Watson (August 1999) 
Measuring Web Mindshare by Jon Udell (September 1999) 
Simple Charting For The Web by Jon Udell (January 2000) 
A Perl Hacker in the Land of Python by Jon Udell (February 2000) 
Learning Perl, Part 1 by Martin Heller (February 2000) 
Learning Perl, Part 2 by Martin Heller (March 2000) 
Learning Perl, Part 3 by Martin Heller (April 2000) 
Learning Perl, Part 4 by Martin Heller (May 2000) 
Linux 2.4 vs. FreeBSD 4.1.1 by Moshe Bar (January 2001) 

Dr. Dobb's Journal 

How Perl Saved the Human Genome Project by Lincoln Stein (Spring 1997 
Sourcebook) 
A Conversation with Larry Wall by Eugene Eric Kim (February 1998) 
Jperl: Accessing Perl from Java by S. Balamurugan (February 1999) 
Examining PerLDAP by Troy Neeriemer (April 1999) 
GUI Construction With Perl by Cameron Laird (January 2001) 
Web Site Searching & Indexing in Perl by Neil Gunton (April 2001) 

The Perl Journal 

CryptoContext by Nathan Torkington (May 1998) 
Localizing Your Perl Programs by Sean M. Burke and Jordan Lachler (May 
1999) 
Dynamic DNS Updates with Perl by Jon Drukman (December 1999) 
Microperl by Simon Cozens (September 2000) 
An IP Telephone in 74 Lines of Perl by Lincoln D. Stein (September 2000) 
Extending Perl with Inline.pm by Brian Ingerson (September 2000) 
Lazy Text Formatting by Damian Conway (May 2001) 
All About Arrays by Nathan Torkington (May 2001) 
Creating XML-RPC Web Services by Jon Orwant (November 2001) 
Resource Locking with Semaphore Files by Sean M. Burke (February 2002) 
perlcc & Compiling Perl Script by Robert Kiesling (November 2002) 
Really Lazy Persistence by Simon Cozens (November 2002) 
Creating RSS Files with XML::RMS by Derek Vadala (December 2002) 

Web Review 

Interview with Larry Wall and Tom Christiansen by Dale Dougherty 
(February 1997) 
Web Server Programming with mod_perl by Nathan Patwardhan, Ellen Siever, 
and Stephen Spainhour (February 1997) 
Regular Expressions Give Perl its Luster by Ben Smith (April 1997) 
Perl -- It Was There by Ben Smith (June 1997) 
Agent Perl by Ben Smith (August 1997) 
5 Specific Rules for Programming in Perl by Simson Garfinkel (August 
1997) 
Working with Data Files by Brent Michalski (September 1997) 
Remote Perl Calling by Ben Smith (October 1997) 
Building the Subroutine by Ben Smith (December 1997) 
Web Client Programming With Perl -- The LWP Library by Clinton Wong 
(December 1997) 
Web Page Updates Through CGI by Brent Michalski (July 1998) 
CGI Troubleshooting Tips by Brent Michalski (July 1998) 
Working with Data Files by Brent Michalski (August 1998) 
Searching a Data File by Brent Michalski (September 1998) 
Scoring a Web Page with Perl and LWP by Brent Michalski (October 1998) 
Searching Newsgroups with Perl by Brent Michalski (November 1998) 
My Favorite Perl Functions by Brent Michalski (December 1998) 
Speeding up the Web with FastCGI by Jonathan Roy (December 1998) 
Running CGI Scripts with mod_perl by Nathan Patwardhan, Ellen Siever, 
and Stephen Spainhour (February 1999) 
Web Server Programming with mod_perl by Nathan Patwardhan, Ellen Siever, 
and Stephen Spainhour (February 1999) 
Image Maps on the Fly by Shawn Wallace (April 1999) 
Setting WAP MIME Types for Microsoft IIS and Apache by Rory Lysaght 
(February 2001) 
Delivering Dynamic WAP Pages with IIS, Perl and ColdFusion by Rory 
Lysaght (June 2001) 
Opening Files in Perl by Mik Garrison (July 2001) 
Mail Management With Mime::Tools by Brian Wilson (September 2001) 

Web Techniques 

Speedy Server Scripts by Lincoln D. Stein (September 1997) 
XML: Can the Desperate Perl Hacker Do It? by Michael Leventhal (March 
1998) 
A Multithreaded Web Server in Perl by Randal L. Schwartz (April 1998) 
Clicking-Through Tracking in Perl by Randal L. Schwartz (May 1998) 
Formatting HTML for CGI.pm by Randal L. Schwartz (October 1998) 
A Perl Script For Monitoring Apache Server Status by Lincoln D. Stein 
(February 1999) 
Torture-Testing Web Servers by Lincoln D. Stein (July 1999) 
Handling Multipage Forms by Randal L. Schwartz (August 1999) 
Paging Through Web Pages by Tim Pozar (August 1999) 
Embedding Perl into Apache by Randal L. Schwartz (September 1999) 
New News Is Good News by Randal L. Schwartz (January 2000) 
Uploading Files and Sending MIME Mail by Randal L. Schwartz (February 
2000) 
Making Headlines with RSS by Jonathan Eisenzopf (February 2000) 
Building an Icon Factory by Randal L. Schwartz (March 2000) 
Make the Simple Things Simple by Steve Johnson (March 2000) 
Object-Oriented Apps in a Relational Database by Brian Jepson (March 
2000) 
Web Access Logs with DBI by Randal L. Schwartz (April 2000) 
Self-Registering Password Protection, Part 1 by Randal L. Schwartz (May 
2000) 
PerlScript by Shelley Powers (May 2000) 
Preserving Integrity by Matt Curtin (May 2000) 
Freudian Script by Kent Tegels (May 2000) 
Self-Registering Password Protection, Part 2 by Randal L. Schwartz (June 
2000) 
Simple XML Processing and Queries by Randal L. Schwartz (July 2000) 
Archiving and Compression with CGI by Randal L. Schwartz (August 2000) 
Getting Image Colors to Text by Randal L. Schwartz (September 2000) 
There Can Be Only One! by Randal L. Schwartz (October 2000) 
Simplicity in Load Balancing by Randal L. Schwartz (November 2000) 
Lone IDE for Perl? by Brian Wilson (November 2000) 
Small Talk by Randal L. Schwartz (December 2000) 
Open Source Potluck by Randal L. Schwartz (January 2001) 
Traffic Surveillance by Randal L. Schwartz (February 2001) 
Online Polling, Simplified by Randal L. Schwartz (March 2001) 
Embedding a Dynamic Image in CGI Output by Randal L. Schwartz (April 
2001) 
Presenting Content One Slide at a Time by John Dimm (April 2001) 
Cookie Monsters by Randal L. Schwartz (May 2001) 
Laughing at the News by Randal L. Schwartz (June 2001) 
Calculating Download Time by Randal L. Schwartz (July 2001) 
One-Click Processing by Randal L. Schwartz (August 2001) 
Spanning and Sorting Your Data by Randal L. Schwartz (September 2001) 
Rendering Calendars in HTML by Randal L. Schwartz (October 2001) 
Customer Feedback Processing Using XML by Randal L. Schwartz (November 
2001) 
Ravaged by Robots! by Randal L. Schwartz (December 2001) 
Generating Clickable Graphs by Randal L. Schwartz (January 2002)

-- 
'When I first met Katho, she had a meat cleaver in one hand and
half a sheep in the other. "Come in", she says, "Hammo's not here.
I hope you like meat.' Sharkey in aus.moto


------------------------------

Date: Thu, 29 Jan 2004 19:48:36 +0100
From: Matija Papec <perl@my-header.org>
Subject: Re: The Perl Journal
Message-Id: <aeki109fkhkvlhdhbl44hp63e722ot0d01@4ax.com>

X-Ftn-To: Iain Chalmers 

Iain Chalmers <bigiain@mightymedia.com.au> wrote:
>> http://www.tpj.com/101Perl.html
>> 
>> Can somebody send my table of contents? :)
>
>Its only ten bucks, just buy it!
>
>:-)

Well I would, but there is also "Best of the Perl Journal",
http://www.amazon.co.uk/exec/obidos/ASIN/0596003102/qid=1075231443/sr=1-8/ref=sr_1_2_8/026-0233506-8872411
and I didn't decide yet which one to get. :)



-- 
Matija


------------------------------

Date: 21 Jan 2004 13:23:01 -0800
From: stevie-googlegroups@qrpff.net (Stevie-O)
Subject: Top-Level Namespace Suggestion/Request: VirtualFS::
Message-Id: <ef8ba8aa.0401211323.11060ce1@posting.google.com>

I've written a module that can read files out of an .iso (iso9660 cd
image) file, and I've tentatively called it VirtualFS::ISO9660.  Does
anyone have a problem with me taking the top-level namespace
VirtualFS:: ?


------------------------------

Date: Wed, 21 Jan 2004 21:52:52 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Top-Level Namespace Suggestion/Request: VirtualFS::
Message-Id: <bumsbk$g9l$1@wisteria.csv.warwick.ac.uk>


stevie-googlegroups@qrpff.net (Stevie-O) wrote:
> I've written a module that can read files out of an .iso (iso9660 cd
> image) file, and I've tentatively called it VirtualFS::ISO9660.  Does
> anyone have a problem with me taking the top-level namespace
> VirtualFS:: ?

Is there any good reason not to use Filesys::?

Ben

-- 
"The Earth is degenerating these days. Bribery and corruption abound.
Children no longer mind their parents, every man wants to write a book,
and it is evident that the end of the world is fast approaching."
     -Assyrian stone tablet, c.2800 BC                         ben@morrow.me.uk


------------------------------

Date: 21 Jan 2004 21:56:33 GMT
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Subject: Re: Top-Level Namespace Suggestion/Request: VirtualFS::
Message-Id: <bumsih$pvt$1@canopus.cc.umanitoba.ca>

In article <ef8ba8aa.0401211323.11060ce1@posting.google.com>,
Stevie-O <stevie-googlegroups@qrpff.net> wrote:
:I've written a module that can read files out of an .iso (iso9660 cd
:image) file, and I've tentatively called it VirtualFS::ISO9660.  Does
:anyone have a problem with me taking the top-level namespace
:VirtualFS:: ?

I'd think that if it the module is portable, usable wherever fine
perls are available, that a top-level namespace would not be
inappropriate. But something under File:: might be a little better.

OT Question:
 .iso files are often fairly large (e.g., 650 Mb). Have you applied
any particular optimization techniques to improve read performance?
Direct IO, scatter-gather, directory caching?
-- 
   "Infinity is like a stuffed walrus I can hold in the palm of my hand.
   Don't do anything with infinity you wouldn't do with a stuffed walrus."
   -- Dr. Fletcher, Va. Polytechnic Inst. and St. Univ.


------------------------------

Date: Wed, 21 Jan 2004 23:44:06 +0000
From: Bruce Horrocks <spamblock@nodomain.nodomain.us>
Subject: Re: Top-Level Namespace Suggestion/Request: VirtualFS::
Message-Id: <DgdJLLFG7wDAFwAZ@nodomain.nodomain.us>

In message <ef8ba8aa.0401211323.11060ce1@posting.google.com>, Stevie-O 
<stevie-googlegroups@qrpff.net> writes
>I've written a module that can read files out of an .iso (iso9660 cd
>image) file, and I've tentatively called it VirtualFS::ISO9660.  Does
>anyone have a problem with me taking the top-level namespace
>VirtualFS:: ?

CD::ISO9660 ??

Which then leaves the way open for:
CD::Audio, CD::Joliet etc.

Regards,
-- 
Bruce Horrocks
Surrey
England
<firstname>@<surname>.plus.com -- fix the obvious for email


------------------------------

Date: 22 Jan 2004 00:08:53 GMT
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Subject: Re: Top-Level Namespace Suggestion/Request: VirtualFS::
Message-Id: <bun4al$3a$1@canopus.cc.umanitoba.ca>

In article <DgdJLLFG7wDAFwAZ@nodomain.nodomain.us>,
Bruce Horrocks  <spamblock@nodomain.nodomain.us> wrote:
:CD::ISO9660 ??

:Which then leaves the way open for:
:CD::Audio, CD::Joliet etc.

With obvious extensions desired into DVD, but DVD wouldn't want
to use the CD prefix. Besides, there is already an Audio::CD
and AudioCD and Video::DVDRip -- and it would be good if those could
be layered on top of virtual filesystems.
-- 
   Tenser, said the Tensor.
   Tenser, said the Tensor.
   Tension, apprehension,
   And dissension have begun.               -- Alfred Bester (tDM)


------------------------------

Date: 21 Jan 2004 18:08:43 -0800
From: stevie-googlegroups@qrpff.net (Stevie-O)
Subject: Re: Top-Level Namespace Suggestion/Request: VirtualFS::
Message-Id: <ef8ba8aa.0401211808.1c320cdb@posting.google.com>

(this is in response the two responses sent back to me)

roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in message news:<bumsih$pvt$1@canopus.cc.umanitoba.ca>...
>
> I'd think that if it the module is portable, usable wherever fine
> perls are available, 
Works on my Windows box.
Works on my Linux shells.
>  that a top-level namespace would not be
> inappropriate. But something under File:: might be a little better.
Well, nothing about the concept actually implies that it's backed by a
file on the local filesystem. For example, a VirtualFS::HTTP might let
you 'open' files that are on an HTTP server and access them with
read() or <>.

> 
> OT Question:
>  .iso files are often fairly large (e.g., 650 Mb). Have you applied
> any particular optimization techniques to improve read performance?
> Direct IO, scatter-gather, directory caching?

It does some slight caching for finding file information, nothing huge
atm.


Bruce Horrocks <spamblock@nodomain.nodomain.us> wrote in message news:<DgdJLLFG7wDAFwAZ@nodomain.nodomain.us>...
> In message <ef8ba8aa.0401211323.11060ce1@posting.google.com>, Stevie-O 
> 
> CD::ISO9660 ??
> 
> Which then leaves the way open for:
> CD::Audio, CD::Joliet etc.
> 

Well, I had decided upon VirtualFS:: because there's no reason someone
couldn't do something similar and write VirtualFS::Ext2,
VirtualFS::Minix, the VirtualFS::HTTP I mentioned above (treat remote
HTTP files as local, how cool would that be?).

Incidentally, I plan to do VirtualFS::ISO9660::Joliet later on.


------------------------------

Date: Fri, 23 Jan 2004 00:13:08 +0000
From: Bruce Horrocks <spamblock@nodomain.nodomain.us>
Subject: Re: Top-Level Namespace Suggestion/Request: VirtualFS::
Message-Id: <m3Ow+DBUcGEAFw9l@nodomain.nodomain.us>

In message <ef8ba8aa.0401211808.1c320cdb@posting.google.com>, Stevie-O 
<stevie-googlegroups@qrpff.net> writes
>> CD::ISO9660 ??
>>
>> Which then leaves the way open for:
>> CD::Audio, CD::Joliet etc.
>>
>
>Well, I had decided upon VirtualFS:: because there's no reason someone 
>couldn't do something similar and write VirtualFS::Ext2, 
>VirtualFS::Minix, the VirtualFS::HTTP I mentioned above (treat remote 
>HTTP files as local, how cool would that be?).

I hadn't spotted Audio::CD [1] so VirtualFS:: is as good as any. It 
solves the problem of what to do with DVD as well.

Regards,

[1] I thought that I had looked under every possibility in CPAN for 
likely candidates but didn't think to check for "Audio" first.
-- 
Bruce Horrocks
Surrey
England
<firstname>@<surname>.plus.com -- fix the obvious for email


------------------------------

Date: Thu, 22 Jan 2004 22:42:56 GMT
From: "edgrsprj" <edgrsprj@ix.netcom.com>
Subject: Unexpected result
Message-Id: <QlYPb.20003$i4.11292@newsread1.news.atl.earthlink.net>

These speed tests produced an unexpected result which I am going to have to
consider.  It says something about the way Perl runs.



I created one of those calculation loops which took about 10 seconds to
execute.  Then I placed "print chr(7);" commands (bell sound) before the
first command in the loop and after the last command.  When the program
executed it appeared to begin doing calculations for about 10 seconds.  Then
it sounded two bell tones about a quarter of a second apart.



That indicates to me that it is doing something like temporarily storing its
output in some location.  And when it is done with other operations such as
the calculations it goes back and sends that stored information to the
output device, in this case the computer screen.



That is quite different from how GW-Basic appears to work.  It immediately
executes statements when it encounters them.  I tried running that bell
sound Perl program in both the Windows mode and the DOS mode and it did the
same thing with both.



Interesting, and something I will need to keep in mind.



"edgrsprj" <edgrsprj@ix.netcom.com> wrote in message
news:LXXPb.19891$i4.1177@newsread1.news.atl.earthlink.net...
> "Paul Lalli" <ittyspam@yahoo.com> wrote in message
> news:20040122121401.P28498@dishwasher.cs.rpi.edu...
> > On Thu, 22 Jan 2004, edgrsprj wrote:
> >
> > print chr(7);
> >
>
> It worked.  Just what I was looking for.  With probably most versions of
> Basic it is:
>
> Print chr$(7)   or   the command  BEEP
>
>
>




------------------------------

Date: Thu, 22 Jan 2004 22:50:57 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Unexpected result
Message-Id: <bupk4h$he6$1@wisteria.csv.warwick.ac.uk>


"edgrsprj" <edgrsprj@ix.netcom.com> wrote:
> These speed tests produced an unexpected result which I am going to have to
> consider.  It says something about the way Perl runs.
> 
> I created one of those calculation loops which took about 10 seconds to
> execute.  Then I placed "print chr(7);" commands (bell sound) before the
> first command in the loop and after the last command.  When the program
> executed it appeared to begin doing calculations for about 10 seconds.  Then
> it sounded two bell tones about a quarter of a second apart.
> 
> That indicates to me that it is doing something like temporarily storing its
> output in some location.  And when it is done with other operations such as
> the calculations it goes back and sends that stored information to the
> output device, in this case the computer screen.

There are two reasons for this. The principle one is that STDOUT is
line-buffered by default, which means output is buffered until you
print a "\n". To turn this off, have a look at $| in perlvar.

The second is that this script of yours is sufficiently trivial that
the time taken to parse and compile the code into perl's internal
bytecode format is longer than the time it actually takes to execute
it.

Ben

-- 
"If a book is worth reading when you are six,                * ben@morrow.me.uk
it is worth reading when you are sixty." - C.S.Lewis


------------------------------

Date: 22 Jan 2004 22:51:22 GMT
From: Glenn Jackman <xx087@freenet.carleton.ca>
Subject: Re: Unexpected result
Message-Id: <slrnc10kvb.so9.xx087@smeagol.ncf.ca>

edgrsprj <edgrsprj@ix.netcom.com> wrote:
>  I created one of those calculation loops which took about 10 seconds to
>  execute.  Then I placed "print chr(7);" commands (bell sound) before the
>  first command in the loop and after the last command.  When the program
>  executed it appeared to begin doing calculations for about 10 seconds.  Then
>  it sounded two bell tones about a quarter of a second apart.


stdout is line buffered.  compare:
    perl -e 'print chr(7); sleep 1; print chr(7)'
    perl -e 'print chr(7),"\n"; sleep 1; print chr(7),"\n"' 

-- 
Glenn Jackman
NCF Sysadmin
glennj@ncf.ca


------------------------------

Date: Thu, 22 Jan 2004 23:18:00 GMT
From: "edgrsprj" <edgrsprj@ix.netcom.com>
Subject: Re: Unexpected result
Message-Id: <ISYPb.20203$q4.11232@newsread3.news.atl.earthlink.net>

"Ben Morrow" <usenet@morrow.me.uk> wrote in message
news:bupk4h$he6$1@wisteria.csv.warwick.ac.uk...

>
>
> There are two reasons for this. The principle one is that STDOUT is
> line-buffered by default, which means output is buffered until you
> print a "\n". To turn this off, have a look at $| in perlvar.
>
> The second is that this script of yours is sufficiently trivial that
> the time taken to parse and compile the code into perl's internal
> bytecode format is longer than the time it actually takes to execute
> it.
>

This is something that warrants further thought.  In this case I think that
the buffering explanation would probably be the one which is controlling
things.  The reason I say that is because if you change the number of
repetitions in the calculation loop the Purl program takes that much longer
to execute.  But the bell tones still wait until everything else is done
before they are sounded.




------------------------------

Date: Thu, 22 Jan 2004 23:24:11 GMT
From: "edgrsprj" <edgrsprj@ix.netcom.com>
Subject: Re: Unexpected result
Message-Id: <vYYPb.20208$q4.12770@newsread3.news.atl.earthlink.net>

"Glenn Jackman" <xx087@freenet.carleton.ca> wrote in message
news:slrnc10kvb.so9.xx087@smeagol.ncf.ca...
> edgrsprj <edgrsprj@ix.netcom.com> wrote:
>
> stdout is line buffered.  compare:
>     perl -e 'print chr(7); sleep 1; print chr(7)'
>     perl -e 'print chr(7),"\n"; sleep 1; print chr(7),"\n"'
>

Yes.  I tried that and see the difference.  Thanks.





------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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.

#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 V10 Issue 6048
***************************************


home help back first fref pref prev next nref lref last post