--- A. Pagaltzis [EMAIL PROTECTED] wrote:
makes no effective difference. Iâd attack this directly by
cleaning up $ENV{PATH}:
use Config;
use File::Spec::Functions;
use File::stat;
use Fcntl qw( :mode );
$ENV{PATH} = do {
my $sep = $Config{path_sep};
--- Ovid [EMAIL PROTECTED] wrote:
$ENV{PATH} = do {
my $sep = $Config{path_sep};
join $sep, (
map { /(.*)/ }
grep { stat($_) !( stat($_)-mode S_IWOTH ) }
grep { file_name_is_absolute($_) }
split( /\Q$sep/,
Functionally, stat(_) avoids actually doing a second stat.
Of course, your gripe may be aesthetic, which this won't help.
-Original Message-
From: Ovid [mailto:[EMAIL PROTECTED]
Sent: Monday, April 16, 2007 11:52 AM
To: module-authors@perl.org
Subject: Re: Module name - smoke testing
Hi Ovid,
* Ovid [EMAIL PROTECTED] [2007-04-16 12:45]:
1. The server I tested this on had one entry in the PATH which
didn't exist on the server, so I first check to see if stat($_)
returns a true value.
But you do it with a double stat, hmm.
2. There was a precedence problem. The not (!)
* Ovid [EMAIL PROTECTED] [2007-04-16 12:55]:
Ugh. I hated my double call to stat().
$ENV{PATH} = do {
my $sep = $Config{path_sep};
join $sep, (
map { /(.*)/ }
grep {
local $_ = stat $_;
defined !( $_-mode
--- A. Pagaltzis [EMAIL PROTECTED] wrote:
Note that `local $_` has issues when tieing or other magic are
involved. If you want to topicalise something, use `for` instead.
Thatâs not viable in this case, though, since `for` doesnât
return a well-defined value and you need that for `grep`.
--- Dave Rolsky [EMAIL PROTECTED] wrote:
Well, it's a little more programmatic than that. The svn up part is
dirt-simple, but doing something like running svn info $uri against
the repo uri to get the last changed date requires some code and
regular expressions and whatnot.
Out of
On Sun, 15 Apr 2007, Ovid wrote:
--- Dave Rolsky [EMAIL PROTECTED] wrote:
Well, it's a little more programmatic than that. The svn up part is
dirt-simple, but doing something like running svn info $uri against
the repo uri to get the last changed date requires some code and
regular
* Dave Rolsky [EMAIL PROTECTED] [2007-04-15 16:35]:
On Sun, 15 Apr 2007, Ovid wrote:
Just doing system('svn', 'info', $uri) can get you an
Insecure $ENV{PATH} (or something like that) when running in
taint mode.
I was going to use File::Which.
What’s the point? File::Which examines the
On 4/15/07, A. Pagaltzis [EMAIL PROTECTED] wrote:
Maybe this deserves to go in some module.
Yeah, File::Which.
--
(darren)
I'm working on a module/app that will be used to automate testing multiple
branches of a code base.
The core idea is that there are multiple test sets, which is really
any directory that contains a t/ subdirectory with .t files. The app will
be a script you can call from cron to run a test
On Apr 13, 2007, at 11:58 AM, Dave Rolsky wrote:
The core idea is that there are multiple test sets, which is
really any directory that contains a t/ subdirectory with .t files.
The app will be a script you can call from cron to run a test set,
and the order is determined by how out of
# from Dave Rolsky
# on Friday 13 April 2007 09:58 am:
I'm working on a module/app that will be used to automate testing
multiple branches of a code base.
...
Internally so far I've been calling it Test::SmokeRunner, which seems
like a reasonable name, but I'm open to suggestions.
I would say
On Fri, 13 Apr 2007, Eric Wilhelm wrote:
If your 'svn up' support and other aspects were configured as pre_smoke
directives in a config, that might make it more easily adaptable than
if the code has to be subclassed to do something different.
Well, it's a little more programmatic than that.
14 matches
Mail list logo