Re: Feedback on POE::Wheel::Run changes

2003-03-05 Thread Rocco Caputo
On Thu, Mar 06, 2003 at 11:00:26AM +1100, [EMAIL PROTECTED] wrote:
> I understand that there is a long-term goal to supercede POE::Wheel::Run
> with a component module with the tentative title of POE::Component::Process
> (http://poe.perl.org/?V1.0-TODOS) and there has been a discussion on the
> mailing list previously about how the POE::Wheel::Run module could be
> improved.  In spite of this, or perhaps because of it, I have made some
> simple additions to the POE::Wheel::Run module which I have needed for some
> in-house projects which I would like to get some feedback on.
> 
> The first of these changes is a simple addition to include a Directory
> parameter to specific the location from within which the program specified
> is executed.  The diff for these changes against the CVS version of
> POE::Wheel::Run (version 1.44) is as follows:

[patch]

> Note that this creates a locally scoped directory change for execution and
> should not affect execution of other components and wheels.

I think it's an interesting feature, but I don't use Wheel::Run enough
to know how generally useful it is.  I'm looking for more discussion
on it before making any decisions.

> I also have changes for username and group specification with name rather
> than UID/GID, bute these changes are very minor and depends upon the
> getpwnam and getgrnam functions which may affect portability of the change.
> 
> Comments and feedback welcomed.

POE::Wheel::Run is already very UNportable.  We can probably work
around missing get(gr|pw)nam functions, or at least throw
"unsupported" errors wherever they fail.

-- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/


RE: Feedback on POE::Wheel::Run changes

2003-03-05 Thread Erick Calder
> some simple additions to the POE::Wheel::Run module

I'm interested in what other changes beyond the directory argument you have
in mind.  I've implemented the chdir feature in PoCo::Child which is a layer
on top of Wheel::Run and would be interested in whatever improvements you or
anyone might suggest.

- e

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 4:00 PM
To: [EMAIL PROTECTED]
Subject: Feedback on POE::Wheel::Run changes

I understand that there is a long-term goal to supercede POE::Wheel::Run
with a component module with the tentative title of POE::Component::Process
(http://poe.perl.org/?V1.0-TODOS) and there has been a discussion on the
mailing list previously about how the POE::Wheel::Run module could be
improved.  In spite of this, or perhaps because of it, I have made some
simple additions to the POE::Wheel::Run module which I have needed for some
in-house projects which I would like to get some feedback on.

The first of these changes is a simple addition to include a Directory
parameter to specific the location from within which the program specified
is executed.  The diff for these changes against the CVS version of
POE::Wheel::Run (version 1.44) is as follows:

7c7
< use vars qw($VERSION);
---
> use vars qw($CWD $VERSION);
64a65,74
> BEGIN {
>   use Cwd;
>
>   sub FETCH { cwd }
>   sub STORE { defined $_[1] and ( chdir $_[1] or die $! ) }
>   sub TIESCALAR { bless \$_, shift }
>
>   tie $CWD, __PACKAGE__;
> };
>
111a122,123
>   my $directory = delete $params{Directory};
>
357a370,373
> # Change the current working directory and maintain within this scope
> local $CWD = $CWD;
> $CWD = $directory if defined $directory;
>

Note that this creates a locally scoped directory change for execution and
should not affect execution of other components and wheels.

I also have changes for username and group specification with name rather
than UID/GID, bute these changes are very minor and depends upon the
getpwnam and getgrnam functions which may affect portability of the change.

Comments and feedback welcomed.

Regards,
Rob


Rob Casey
Implementation Analyst
Essential and Direct Mail Development
Hermes Precisa Australia (Victoria)
Phone : (03) 9217-5501
Email : [EMAIL PROTECTED]




**
IMPORTANT
The contents of this e-mail and its attachments are confidential and
intended
solely for the use of the individual or entity to whom they are
addressed.  If you received this e-mail in error, please notify
the HPA Postmaster, [EMAIL PROTECTED], then delete
the e-mail.

This footnote also confirms that this e-mail message has been swept for
the presence of computer viruses by MimeSweeper.  Before opening or
using any attachments, check them for viruses and defects.

Our liability is limited to resupplying any affected attachments.

HPA collects personal information to provide and market our services.
For more information about use, disclosure and access see our Privacy
Policy at www.hpa.com.au
**



Feedback on POE::Wheel::Run changes

2003-03-05 Thread Robert . Casey
I understand that there is a long-term goal to supercede POE::Wheel::Run
with a component module with the tentative title of POE::Component::Process
(http://poe.perl.org/?V1.0-TODOS) and there has been a discussion on the
mailing list previously about how the POE::Wheel::Run module could be
improved.  In spite of this, or perhaps because of it, I have made some
simple additions to the POE::Wheel::Run module which I have needed for some
in-house projects which I would like to get some feedback on.

The first of these changes is a simple addition to include a Directory
parameter to specific the location from within which the program specified
is executed.  The diff for these changes against the CVS version of
POE::Wheel::Run (version 1.44) is as follows:

7c7
< use vars qw($VERSION);
---
> use vars qw($CWD $VERSION);
64a65,74
> BEGIN {
>   use Cwd;
>
>   sub FETCH { cwd }
>   sub STORE { defined $_[1] and ( chdir $_[1] or die $! ) }
>   sub TIESCALAR { bless \$_, shift }
>
>   tie $CWD, __PACKAGE__;
> };
>
111a122,123
>   my $directory = delete $params{Directory};
>
357a370,373
> # Change the current working directory and maintain within this scope
> local $CWD = $CWD;
> $CWD = $directory if defined $directory;
>

Note that this creates a locally scoped directory change for execution and
should not affect execution of other components and wheels.

I also have changes for username and group specification with name rather
than UID/GID, bute these changes are very minor and depends upon the
getpwnam and getgrnam functions which may affect portability of the change.

Comments and feedback welcomed.

Regards,
Rob


Rob Casey
Implementation Analyst
Essential and Direct Mail Development
Hermes Precisa Australia (Victoria)
Phone : (03) 9217-5501
Email : [EMAIL PROTECTED]
 



**
IMPORTANT
The contents of this e-mail and its attachments are confidential and intended
solely for the use of the individual or entity to whom they are
addressed.  If you received this e-mail in error, please notify
the HPA Postmaster, [EMAIL PROTECTED], then delete 
the e-mail.

This footnote also confirms that this e-mail message has been swept for
the presence of computer viruses by MimeSweeper.  Before opening or
using any attachments, check them for viruses and defects.

Our liability is limited to resupplying any affected attachments.

HPA collects personal information to provide and market our services.
For more information about use, disclosure and access see our Privacy
Policy at www.hpa.com.au
**