Re: OT? Perl Question, iCal

2012-06-02 Thread Dirk Koopman
On 01/06/12 21:59, Simon Wistow wrote: it's dog slow (fcvo 'dog') I find my values of dog don't really apply (being Border Terriers), or are unhelpful in these circumstances. Try: snail on mogodon. Less variability and very, very slow.

Re: OT? Perl Question, iCal

2012-06-01 Thread Simon Wistow
On Tue, May 22, 2012 at 02:48:05PM +0100, Roger Burton West said: On Tue, May 22, 2012 at 03:35:51PM +0200, Nic Gibson wrote: search.cpan.org gives me far too many results for iCal. I need to parse iCalendar (rfc 5545) files and then write them out as xCal (rfc 6321) files. Does anyone have

Re: OT? Perl Question, iCal

2012-05-31 Thread Simon Cozens
On 22/05/2012 22:35, Nic Gibson wrote: search.cpan.org gives me far too many results for iCal. Text::vFile is my weapon of choice for v-flavoured file formats, of which iCalendar is a variant.

OT? Perl Question, iCal

2012-05-22 Thread Nic Gibson
This appears to be my first message to london.pm in four years or so. Ho hum. search.cpan.org gives me far too many results for iCal. I need to parse iCalendar (rfc 5545) files and then write them out as xCal (rfc 6321) files. Does anyone have a particular recommendation for a module? Writing

Re: OT? Perl Question, iCal

2012-05-22 Thread Roger Burton West
On Tue, May 22, 2012 at 03:35:51PM +0200, Nic Gibson wrote: search.cpan.org gives me far too many results for iCal. I need to parse iCalendar (rfc 5545) files and then write them out as xCal (rfc 6321) files. Does anyone have a particular recommendation for a module? Writing the XML isn't the

Re: OT? Perl Question, iCal

2012-05-22 Thread Nic Gibson
On 22 May 2012, at 18:10, David Cantrell wrote: On Tue, May 22, 2012 at 03:35:51PM +0200, Nic Gibson wrote: search.cpan.org gives me far too many results for iCal. I need to parse iCalendar (rfc 5545) files and then write them out as xCal (rfc 6321) files. Does anyone have a particular

Re: OT? Perl Question, iCal

2012-05-22 Thread David Cantrell
On Tue, May 22, 2012 at 03:35:51PM +0200, Nic Gibson wrote: search.cpan.org gives me far too many results for iCal. I need to parse iCalendar (rfc 5545) files and then write them out as xCal (rfc 6321) files. Does anyone have a particular recommendation for a module? Writing the XML isn't

Re: OT perl question

2002-01-16 Thread Newton, Philip
Nicholas Clark wrote: Does a CGI always run with a socket as STDOUT? (in that running with a CGI-faked ENV as part of a pipe in a cron job is going to look awfuly like being run from a web server) Or will there be servers that run the CGI with the output to a pipe and in turn pump that

Re: OT perl question

2002-01-16 Thread Sam Vilain
On Wed, 16 Jan 2002 09:20:49 +0100 Newton, Philip [EMAIL PROTECTED] wrote: FYI, the Xitami web server (at least on Win32 systems) doesn't output any of the CGI's output to the client until the CGI is done, so perhaps it implements CGI with STDOUT directed to a file, which it then reads -- in

Re: OT perl question

2002-01-16 Thread Newton, Philip
Sam Vilain wrote: On Wed, 16 Jan 2002 09:20:49 +0100 Newton, Philip [EMAIL PROTECTED] wrote: FYI, the Xitami web server (at least on Win32 systems) doesn't output any of the CGI's output to the client until the CGI is done, so perhaps it implements CGI with STDOUT directed to a file

Re: OT perl question

2002-01-16 Thread Mike Jarvis
On Wed, 2002-01-16 at 07:03, Newton, Philip wrote: AFAIK, Apache manages to pass content along to the client as soon as it receives it from the CGI program, even on Win32. Nope, at least not yet. It's been going to be fixed in the next release for quite a while. 2.0 though. Yep, it'll be

Re: OT perl question

2002-01-15 Thread Chris Devers
On Tue, 15 Jan 2002, nemesis wrote: Anyone know of a way of telling whether a perl script was called as a CGI (via the apache webserver) or directly (as in as a cron script or command line)? Take a look at %ENV. I'm guessing that $ENV{'SERVER_NAME'} et al won't be set when running as a cron

Re: OT perl question

2002-01-15 Thread Struan Donald
* at 15/01 15:21 + nemesis said: Anyone know of a way of telling whether a perl script was called as a CGI (via the apache webserver) or directly (as in as a cron script or command line)? will be a whole load of exciting CGI type things in %ENV if it's a cgi call so you could test for

Re: OT perl question

2002-01-15 Thread Tommie M. Jones
use getpwnam to find out who the user is. http://www.atlantageek.com Get inside Atlanta's Tech scene On Tue, 15 Jan 2002, nemesis wrote: Anyone know of a way of telling whether a perl script was called as a CGI (via the apache webserver) or directly (as in as a cron script or command

Re: OT perl question

2002-01-15 Thread Dominic Mitchell
nemesis [EMAIL PROTECTED] writes: Anyone know of a way of telling whether a perl script was called as a CGI (via the apache webserver) or directly (as in as a cron script or command line)? if (exists $ENV{SERVER_NAME}) { print I'm a cgi (probably)\n; } else { print I don't

Re: OT perl question

2002-01-15 Thread David Cantrell
On Tue, Jan 15, 2002 at 03:26:42PM +, Struan Donald wrote: * at 15/01 15:21 + nemesis said: Anyone know of a way of telling whether a perl script was called as a CGI (via the apache webserver) or directly (as in as a cron script or command line)? will be a whole load of exciting

Re: OT perl question

2002-01-15 Thread nemesis
Dominic Mitchell wrote: nemesis [EMAIL PROTECTED] writes: Anyone know of a way of telling whether a perl script was called as a CGI (via the apache webserver) or directly (as in as a cron script or command line)? if (exists $ENV{SERVER_NAME}) { print I'm a cgi (probably)\n; }

Re: OT perl question

2002-01-15 Thread Robin Houston
On Tue, Jan 15, 2002 at 04:06:40PM +, David Cantrell wrote: In C, you want isatty(3). In perl, try stat()ing STDIN. Or just use: if (-t) { ...} Pretty unreliable though - what if you used it in a pipe? I think the environment is a better way to go. It's actually pretty useful that you

Re: OT perl question

2002-01-15 Thread Dominic Mitchell
nemesis [EMAIL PROTECTED] writes: Thanks to everyone who helped. I will dump all the $ENV variable see what I can see in the different cases. Alternatively, have a look at some of the test cgi scripts that come with apache. I was far too lazy to actually write a CGI to find that one out.

Re: OT perl question

2002-01-15 Thread Paul Makepeace
On Tue, Jan 15, 2002 at 05:27:45PM +, Dominic Mitchell wrote: nemesis [EMAIL PROTECTED] writes: Thanks to everyone who helped. I will dump all the $ENV variable see what I can see in the different cases. Alternatively, have a look at some of the test cgi scripts that come with

Re: OT perl question

2002-01-15 Thread Nicholas Clark
On Tue, Jan 15, 2002 at 04:15:29PM +, [EMAIL PROTECTED] wrote: I'd be very surprised if you have a terminal in a cron job (which was one possibility from the original requirements above). You can probably also use POSIX::isatty() from perl but I haven't checked it in detail, or the -t