[24134] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6328 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 29 09:15:45 2004

Date: Mon, 29 Mar 2004 06:15:13 -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           Mon, 29 Mar 2004     Volume: 10 Number: 6328

Today's topics:
    Re: life time of $1? (Anno Siegel)
    Re: life time of $1? <nobull@mail.com>
    Re: life time of $1? <nobull@mail.com>
    Re: losing data on socket (Vorxion)
    Re: Loss of privledges in a perl app <bik.mido@tiscalinet.it>
    Re: Loss of privledges in a perl app lvirden@yahoo.com
        Question about import user defined modules. <ckacka@163.com>
    Re: Question about import user defined modules. (Anno Siegel)
    Re: Regex match for one and only one occurrence of a pa <nobull@mail.com>
        Search for Unix created/modified date in script <mark.harris.nospam@ukonline.co.uk.nospam>
    Re: Search for Unix created/modified date in script (Anno Siegel)
        Testing PHP script using Test::Simple perl script (John Ramsden)
    Re: The "value" of a block in 'map' <bart.lateur@pandora.be>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 29 Mar 2004 11:40:53 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: life time of $1?
Message-Id: <c49205$ki4$4@mamenchi.zrz.TU-Berlin.DE>

Myron Turner <mturner@ms.umanitoba.ca> wrote in comp.lang.perl.misc:
> On Sat, 27 Mar 2004 14:13:29 -0600, Tad McClellan
> <tadmc@augustmail.com> wrote:
> 
> >Geoff Cox <geoffacox@dontspamblueyonder.co.uk> wrote:
> >
> >> I am confused re the $1 issue below
> >
> >   The numbered variables ($1, $2, $3, etc.) and the related punctuation
> >   set ($+, $&, $`, $', and $^N) are all dynamically scoped
> >   until the end of the enclosing block or until the next successful
> >   match, whichever comes first.  (See L<perlsyn/"Compound Statements">.)
> >
> >
> >> 
> >> can I use $1 (and $2) again?
> >
> >
> >You should never use the dollar-digit variables unless you
> >have first ensured that the match _succeeded_. (I have
> >pointed this out to you before.)
> 
> In a loop, if your code depends on testing a numbered $ variable, to
> determine whether something has occurred,  you can place the regular
> expression in an eval:
> 
> while(<>) {
>     my $num = eval{  /(\d+)/; return $1 if $1; return undef; };
>    check_this_number($num) if $num;
> }
> 
> If you don't use the eval, then the next time through the loop, there
> might not be a number in $_, but $1 would still test true because it
> would still hold the number from the previous iteration.

Sorry to be blunt, but that's nonsense.

"Eval" is of no use in this situation, and the way you use it is buggy.
(You throw away legitimate results of "0" and "").

The standard is

    if ( /(\d+)/ ) {
        # use $1, whether boolean true or not
    } else {
        # deal with mismatch
    }

If you want the result reflected in $num being defined or not, use

    my $num = /(\d+)/ and $1;

The use of "eval" here is abusive and misleading.

Anno


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

Date: 29 Mar 2004 12:58:37 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: life time of $1?
Message-Id: <u9oeqf985u.fsf@wcl-l.bham.ac.uk>

anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) writes:
> 
> If you want the result reflected in $num being defined or not, use
> 
>     my $num = /(\d+)/ and $1;

I would only use that in the case where it was something other than
the first capture ($1) that was wanted.  Where the first capture is
what is wanted I prefer to see:

    my ($num) = /(\d+)/;

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 29 Mar 2004 13:04:33 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: life time of $1?
Message-Id: <u9k71397vy.fsf@wcl-l.bham.ac.uk>

Geoff Cox <geoffacox@dontspamblueyonder.co.uk> writes:

> I am confused re the $1 issue below
> 
> say I have
> 
> &fred($1)

Remove the & unless you know what it does and really want those semantics.
 

Note that subroutine arguments in Perl are passed by reference not by
value.  Most of the time this not an issue but for the special $digit
variables it can be sometimes.  For this reason it is wise to
explicitly stringifty the $digit variables in subroutine arguments
lists.

  fred("$1");
 
> sub fred {
> 
> my $data = $1

You mean

  my $data = shift;

> my $line =~ /.*jim(.).*?fred(.)
> 
> }
> 
> can I use $1 (and $2) again?

Yes.  But be warned if you'd had a m// in your subroutine _before_
you'd shifted the argument off @_ _and_ you had not quoted the $1 in
the call to fred() then the value you'd get in $data would be the
value of $1 now, not the value when the subroutine was called.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 29 Mar 2004 06:52:55 -0500
From: vorxion@knockingshopofthemind.com (Vorxion)
Subject: Re: losing data on socket
Message-Id: <40680e17$1_1@news.iglou.com>

In article <c48h3a$75d$1@nets3.rz.RWTH-Aachen.DE>, Tassilo v. Parseval
wrote:

>Also sprach Vorxion:
>
>> In article <c47jll$kov$1@nets3.rz.RWTH-Aachen.DE>, Tassilo v. Parseval
>> wrote:
>>
>>>Also sprach Vorxion:
>
>You don't have to do that. Either use our() or do a preliminary
>
>    use vars qw/$first_global $second_global .../;
>
>Once you have done that and it still complains, it means you made a typo.
>That's a huge help because you no longer have to check those trivial
>things yourself.

Yes, well...now I know about our().  :)

>At least you gave me a very hard time reading it. When I see curlies
>in the vicinity of a '$', I first assume there is some sort of
>hash-subscript. People have different reading and understanding habits, I
>grant you that. But since you posted your codes to have others read it,
>it can't hurt to toe the line a bit. The more easily we (the group) can
>read your code, the more likely it is that we can find the source of yours
>problems.

Well, you asked for the code as it was...I wasn't rewriting a short sample
specifically for here...

I -think- I've found the source of my problems, but changing what should
have fixed it...hasn't.  It's definitely a step in the right direction, but
it's still not right.

>Yes, alright, it is a forward declaration. perlipc.pod neglected to
>mention why it used one in one of the code snippets. The outline was:

[snip]

>Apparently the author of this code snippet wanted to be able to call
>spawn() without braces. Had he instead written:

I had wondered about it, since that's the only place I'd seen it.

>Anyway, it's not a serious issue. Your forward declaration isn't going
>to hurt anyone but it doesn't hurt either to know what they are really
>for.

Well, you cleared up that mystery.  Thanks!

>Your program has LOTS of variables in general. ;-)

Yeah, well...you should see the lot I cut out.  There must be about 20
hashes.  Each tracks an aspect of the client state, the key of each being
the fd of the connection.

>Note that I didn't complain about the comma where you used it with a
>statement-modifier. There you need in fact something that turns two
>statements into one so a comma (or sometimes 'and' or '&&') is in order.

Yes.  I'm honestly not sure why I had that one in there.  I just reverted
to an earlier version of the code and the line in question was not present.
I suspect I was doing something during re-coding and testing to try and fix
the problem, and I hadn't sanitised it yet.  I just actually looked for it
and it's not in the last "real" version.  Go figure...

>Keep in mind though that fl_die() can also pass the value of
>$cli_logfile on to fl_log().

Irrelevant when $cli_logfile is actually a package-scoped (main::) variable
that's used by Getopt::Long.  In this case, it was handier to just modify
it in place if needed.  Usually I'd create a separate variable if I was
going to change something like that after the getopt code ran.

>Apparently your situation is that you have a program which requires a
>lot of global data. Sometimes there is nothing one can do about that. 

Yeah.  It could be handled several ways.  I'm still not sure I picked the
right model of the two I could have used, since I needed to fork in one
place -anyway-.  I could have avoided several issues--one of which being
the need to track each connection's states independantly in the same space.
Then there's the timeout code that's a bit dodgy yet.  The calculation I do
holds up until you hit about the hundredths place on timeouts per second on
select()--then it becomes an inaccurate timer.  I need to fix that after I
sort out the buffering.

>Perl gives you a lot of ways organizing your data and variables in such
>a situation. Always using package globals might not be the best. There
>are other means, such as using an object (one that incorporates and
>encapsulates all the global stuff so it is no longer floating around the
>main logic of the program). Sometimes closures can be used: a closure is
>a function that has some variables attached to it:
>
>    use strict;
>    
>    {
>	my $var;
>	sub set_var { $var = shift }
>	sub get_var { $var }
>    }
>
>    set_var("foo");	# sets the above '$var'
>    print get_var();	# prints: "foo"
>
>    # compile time error: '$var' is only visible from within the block
>    $var = "bar";

Interesting methodology.  And I've read up on how to code OO classes and
objects, but I haven't ventured to do so yet.  It was just two years ago
that I figured out how to -use- them.  25+ years of top-down coding doesn't
lend itself easily to learning OO.  It's a huge paradigm shift.  To its
credit, the perltoot man page was -the- document that finally got OO
concepts through my skull.  I'd tried everything.  Core Java.  OO for
Dummies (I kid you not), a bunch of things.  I finally clicked with the
perltoot page one night.

I understand how to create classes and objects, I just haven't had the time
or inclination to start in on them.  Next pet test project, since I'll be
working with Perl/Tk next as well.  This project I'm on is not the time to
switch horses in mid-stream.

>If you use Perl's die() without a terminating newline, you get the line
>number in the error message.

I'm aware of that.  I intentionally suppress that behaviour.  With my error
codes, it's superfluous, and to a user it looks like a neatly handled
error, rather than something wrong with the OS (you'd be surprised at how
thick or just plain inexperienced some users can really be).

>>>Wouldn't hurt to include $! in the error message:
>> 
>> Possibly not, but I prefer clean error messages that don't confuse users.
>> If I have to go in and debug, I can put it in when I test.
>
>But it could help the user. When he gets a "permission denied", he knows
>that he might have to change the permission on a certain file or
>directory to make it work.

*chuckle*  You don't know the users I'm dealing with.  :)

There are other situations as well, where I'm doing CGI and I
-specifically- want to hide -any- internal system information--where
security dictates that the less system information doled out, the better.

>> That's what the % key in vi (or the default matching mode in emacs) is for.
>>:)
>
>But wouldn't it be so much nicer if one didn't even need the help of the
>editor for that? I use '%' sometimes on largish block structures to
>figure out where blocks end (you need it quite often when you are
>staring at the source code of perl as it uses a somewhat idiosyncratic
>way of indentation).

I barely use it.  I've been using vi for about 10 years (I was a major
emacs-a-holic for 4 years before that) and I first learned about the % key
in vi about 3 weeks ago, I kid you not.

Following the nested braces just isn't an issue for me.  I just see where
they go.  I rarely have to count, I'm so used to them.

>I didn't say you posted too much (not in the sense of posting too much
>semantic content). What I meant to say was that I cannot follow the
>logic of your code. Being in this group is just a hobby for me (and all
>others). I am not getting paid to review other people's code and so I
>give up when things get too tedious and tricky. I didn't not address
>your actual problem because I was being malicious. I would have
>addressed it, had I been able to find it. Your coding style prevented me
>from doing that.

Sorry for that.  And that's a perfectly reasonable and acceptable response.
I think had I been told -that- in the first place -with- the rest of it,
I'd not have taken any of it the way I did.

>That's how usenet works. You make a posting and other people start
>discussing certain aspects of it...or sometimes they talk about other
>non-related things. You cannot control it. Therefore it is advisable to
>present the problem in a way that makes talking about side-issues
>harder for the audience.

Well it was hardly intentional.  I was in a hurry to slice, dice, and get
it up as requested.  I didn't take the time to rewrite a mini-example.
Although...if I can't fix this with the new information I just re-learned
tonight, I may do just that--in a style that won't cloud the issue.

>Anyway, I am happy you didn't take my criticism (that was targeted
>towards your code and not you) personally. Whenever people do that,
>they've already lost.

Not yours, no.  Uri...hit me in a different manner, but I'm not even ticked
at him at this point.  I'm too happy that I -think- I've found the source
of my problem.  Problem is, it's still not working right.

I was having issues with buffering, as we may all remember.  Well, I just
did a search online and was reading over various papers here and there and
it just struck me that I've been using sysread/syswrite, not read/write.
Stupid move to do, since that bypasses buffering altogether.

Problem is, I now have read/write in place, autoflush is off, I'm flushing
only when appropriate, and I'm -still- losing my data--both in perlio mode
and stdio mode with setvbuf using a 1MB buffer.  I'm convinced I'm on the
right track.  I just need to find what else is throwing it.  That was a
huge, glaring, gaping error on my part though, having reread the docs after
reading someone's page on various buffering issues.  I banged my head on
the keyboard repeatedly, trust me.

-- 
Vorxion - Member of The Vortexa Elite


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

Date: Mon, 29 Mar 2004 10:17:47 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Loss of privledges in a perl app
Message-Id: <dqne60d469uat747l4dt4hs6c0kloebtdg@4ax.com>

On Sun, 28 Mar 2004 10:44:20 -0500, Bernie Cosell
<bernie@fantasyfarm.com> wrote:

>} I read somewhere that it's also necessary to call fork and exit for the
>} switch to happen correctly.  Why is that?

I think you need to 'fork and exit' to go in the bg. You surely know
what fork() returns to the parent and to the child respectively, don't
you?


Michele
-- 
you'll see that it shouldn't be so. AND, the writting as usuall is
fantastic incompetent. To illustrate, i quote:
- Xah Lee trolling on clpmisc,
  "perl bug File::Basename and Perl's nature"


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

Date: 29 Mar 2004 13:02:25 GMT
From: lvirden@yahoo.com
Subject: Re: Loss of privledges in a perl app
Message-Id: <c496p1$nkl$1@srv38.cas.org>


According to Sherm Pendley  <spamtrap@dot-app.org>:
:lvirden@yahoo.com wrote:
:
:> Could merely adding this line have caused perl to give up the effective
:> userid state?
:
:Yes - although not for the reason you might be imagining. Many systems clear
:the suid bit on a file whenever that file is written to, as a security
:precaution. So simply editing the file and changing it, regardless of what
:was added or changed, can cause the script to give up its suid state.

Thanks.  In my case, I'm making my changes within the source code management
system and doing a fresh install of the new app - so the editing won't cause
my script to give up suid.

:BTW, there's no need to call an external program like "id" to get the
:currently euid - there are Perl variables that already hold that info. 

Thanks - I will change to this method to make certain that I didn't cause
some sort of side effect.

Is there anything else I can do to try to determine why the application
is losing its setuid state? 
-- 
<URL: http://wiki.tcl.tk/ > In God we trust.
Even if explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
<URL: mailto:lvirden@yahoo.com > <URL: http://www.purl.org/NET/lvirden/ >


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

Date: Mon, 29 Mar 2004 21:08:03 +0800
From: "ckacka" <ckacka@163.com>
Subject: Question about import user defined modules.
Message-Id: <c4973l$2f72kl$1@ID-224383.news.uni-berlin.de>

I write code as follows:

==================================================================
=====  /home/ckacka/public_html/cgi-bin/ckacka/Module.pm

package Module;

use strict;
use Exporter;
use vars qw/$VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS/;

$VERSION     = 0.91;
@ISA         = qw/Exporter/;
@EXPORT      = ();
@EXPORT_OK   = qw/&wwwdoc &wwwcgi &docdir &cgidir/;
%EXPORT_TAGS = (
                ':default' => [ qw/&wwwdoc &wwwcgi &docdir &cgidir/ ]
                );

# Global varibles.
# Depends your host's setting.
sub wwwdoc { return 'http://localhost/~ckacka'; }
sub wwwcgi { return 'http://localhost/~ckacka/cgi-bin'; }
sub docdir { return '/home/ckacka/public_html'; }
sub cgidir { return '/home/ckacka/public_html/cgi-bin'; }

1;

==================================================================
=====  /home/ckacka/public_html/cgi-bin/home.cgi

#!/usr/bin/perl -w


use Fcntl qw/:flock/;
use CGI::Pretty qw/:standard/;
use strict;
use diagnostics;

use ckacka::Module qw/:default/;
BEGIN { push @INC, '/home/ckacka/public_html/cgi-bin' }


my $wwwdoc = wwwdoc();
my $wwwcgi = wwwcgi();
my $docdir = docdir();
my $cgidir = cgidir();

 ...
 ..
 .

==================================================================

Run it with ouput:

$ perl home.cgi
Undefined subroutine &main::wwwdoc called at home.cgi line 12 (#1)
    (F) The subroutine indicated hasn't been defined, or if it was, it has
    since been undefined.

Uncaught exception from user code:
        Undefined subroutine &main::wwwdoc called at home.cgi line 12.

==================================================================

Thanks

ckacka




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

Date: 29 Mar 2004 13:26:47 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Question about import user defined modules.
Message-Id: <c4986n$q7k$1@mamenchi.zrz.TU-Berlin.DE>

ckacka <ckacka@163.com> wrote in comp.lang.perl.misc:
> I write code as follows:
> 
> ==================================================================
> =====  /home/ckacka/public_html/cgi-bin/ckacka/Module.pm
> 
> package Module;
> 
> use strict;
> use Exporter;
> use vars qw/$VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS/;
> 
> $VERSION     = 0.91;
> @ISA         = qw/Exporter/;
> @EXPORT      = ();
> @EXPORT_OK   = qw/&wwwdoc &wwwcgi &docdir &cgidir/;
> %EXPORT_TAGS = (
>                 ':default' => [ qw/&wwwdoc &wwwcgi &docdir &cgidir/ ]
>                 );
> 
> # Global varibles.
> # Depends your host's setting.
> sub wwwdoc { return 'http://localhost/~ckacka'; }
> sub wwwcgi { return 'http://localhost/~ckacka/cgi-bin'; }
> sub docdir { return '/home/ckacka/public_html'; }
> sub cgidir { return '/home/ckacka/public_html/cgi-bin'; }
> 
> 1;
> 
> ==================================================================
> =====  /home/ckacka/public_html/cgi-bin/home.cgi
> 
> #!/usr/bin/perl -w
> 
> 
> use Fcntl qw/:flock/;
> use CGI::Pretty qw/:standard/;
> use strict;
> use diagnostics;
> 
> use ckacka::Module qw/:default/;
> BEGIN { push @INC, '/home/ckacka/public_html/cgi-bin' }
> 
> 
> my $wwwdoc = wwwdoc();
> my $wwwcgi = wwwcgi();
> my $docdir = docdir();
> my $cgidir = cgidir();
> 
> ...
> ..
> .
> 
> ==================================================================
> 
> Run it with ouput:
> 
> $ perl home.cgi
> Undefined subroutine &main::wwwdoc called at home.cgi line 12 (#1)
>     (F) The subroutine indicated hasn't been defined, or if it was, it has
>     since been undefined.
> 
> Uncaught exception from user code:
>         Undefined subroutine &main::wwwdoc called at home.cgi line 12.
> 
> ==================================================================

This is awfully messy.

I'm not sure how the module "ckacka::Module" is found at all, but
what you push on @INC has nothing to do with it because it comes
after "use ckacka::Module ...".

In any case, the imports you have planned will not be executed.  For
that, the name of the module you load ("ckacka::Module") and the
package from which to export must be the same.  However, your
package is just "Module", so the system looks for "ckacka::Module->import",
doesn't find it and shrugs.

Either change the module name (which, in part, determines where the
module file must be stored_), or change the "package" statement in the
module.

Anno


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

Date: 29 Mar 2004 12:55:11 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: Regex match for one and only one occurrence of a pattern
Message-Id: <u9smfr98bk.fsf@wcl-l.bham.ac.uk>

Tad McClellan <tadmc@augustmail.com> writes:

> Steve Allgood <chiriones@yahoo.com> wrote:
> > I'm trying to match one and only one occurrence of a pattern in a string.
> > 
> > For example, for the pattern 'bc' I want a regex to match 'abcd' but not 'abcdabcd'.
> > 
> > I have tried /bc(?!(.*bc)+)/ but that doesn't work.  It just matches the last 'bc'.
> > 
> > Any suggestions?
> 
> 
>    print "matched\n" if s/bc/bc/g == 1;

Nice, but using s/// to not modify a string makes me feel a little
uncomfortable.

    print "matched\n" if (() = /bc/g) == 1;

Note: The above only works for regex with no captures.

Or..

    # Assume pos() == 0 initially
    print "matched\n" if /bc/g && ! /bc/g;
    # Warning: maybe pos() != 0 now


Or rather more directly...

    print "matched\n" if /bc/ && !/bc.*bc/;

Of course if you must do it in one regex:

    print "matched\n" if /^(?!(.*bc){2}).*bc/;

However if you are compelled to use a single regex because you are
calling a function that takes a regex argument you may want to alter
that function to accept coderef arguments too.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Mon, 29 Mar 2004 11:31:15 +0100
From: "Mark" <mark.harris.nospam@ukonline.co.uk.nospam>
Subject: Search for Unix created/modified date in script
Message-Id: <4067fb69$0$3602$afc38c87@news.easynet.co.uk>

Hello,

I have a Perl script which creates an array of all files in a Unix directory
which have a .info suffix, thusly:

opendir(DIR, "$dir") or die("dir error: $!");

@entries = grep(/\.info$/, sort(readdir(DIR)));

closedir(DIR);

foreach $file (@entries)
{
    ...
}

I'm looking to restrict the search to only include .info files which have
been created or modified since the last time the script was run.

I think that I need to store the date & time of the last run in a file
somewhere so that I can read it back in and use it, then set it to the
current date & time before the script ends.

The question is: how do I use the retrieved date to match against the
created/modified date of the Unix file?

Thanks for any information.

Mark




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

Date: 29 Mar 2004 11:13:50 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Search for Unix created/modified date in script
Message-Id: <c490de$ki4$2@mamenchi.zrz.TU-Berlin.DE>

Mark <mark.harris.nospam@ukonline.co.uk.nospam> wrote in comp.lang.perl.misc:
> Hello,
> 
> I have a Perl script which creates an array of all files in a Unix directory
> which have a .info suffix, thusly:
> 
> opendir(DIR, "$dir") or die("dir error: $!");
> 
> @entries = grep(/\.info$/, sort(readdir(DIR)));
> 
> closedir(DIR);
> 
> foreach $file (@entries)
> {
>     ...
> }
> 
> I'm looking to restrict the search to only include .info files which have
> been created or modified since the last time the script was run.
> 
> I think that I need to store the date & time of the last run in a file
> somewhere so that I can read it back in and use it, then set it to the
> current date & time before the script ends.
> 
> The question is: how do I use the retrieved date to match against the
> created/modified date of the Unix file?

You use the stat() function.  Perldoc -f stat.

Anno


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

Date: 29 Mar 2004 05:27:23 -0800
From: john_ramsden@sagitta-ps.com (John Ramsden)
Subject: Testing PHP script using Test::Simple perl script
Message-Id: <d27434e.0403290527.ee7835f@posting.google.com>

I have a perl logging module that sends log messages,
via post variables, to a simple PHP web app whose
purpose is to write them to a database table.

The module is organized in the standard Test::Simple
format, and as one of the unit tests I'd like to
include a message send (followed by a read of the
database table). But to make the tests self-contained
I'd prefer not to assume that the logging web app is
installed.

Can anyone suggest a way of running a PHP script,
possibly with an auxiliary script (?) to accept
post variables in interactive mode?

I thought of starting an Apache instance, using a
config file in the perl test directory and listening
on a non-standard port. But this, even if possible,
seems like using a hammer to crack a nut.

All constructive suggestions welcome...


Cheers

John R Ramsden


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

Date: Mon, 29 Mar 2004 09:30:15 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: The "value" of a block in 'map'
Message-Id: <e3rf60df5t487jaube2ia56gkrr7ucfvjg@4ax.com>

Klaas wrote:

>java does likewise.  Anyone know a language with ?: that doesn't short-
>circuit?

Basic? Though there, if present, the operator is spelled "IFF".

-- 
	Bart.


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

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 6328
***************************************


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