Leon Timmermans | 5 Sep 2010 15:57
Picon
Gravatar

Re: [PATCH] Start revamping perlipc.pod

On Sun, Sep 5, 2010 at 7:03 AM, Shlomi Fish <shlomif <at> iglu.org.il> wrote:
> Inspired by a message ot the perl documentation proejct, I started working on
> revamping perlipc.pod here:

Good idea :-)

> What I did so far is convert all tabs to spaces (as the indentation was very
> erratic) and started modernising the code (adding line spaces, declare
> variables with my, not cuddle else's, etc.). So far I've reached the named
> pipes section in my code coverage, and I'm planning to convert the socket
> examples to IO::Socket when I get to them.

Some of my ideas and questions for perlipc would be:

* Reorganize the order of chapters. Signals *really* should not be the
first thing on the list. In fact they should probably leave only SysV
IPC behind them. Named pipes should probably also be moved down.
* Convert all glob filehandles to lexical filehandles.
* Convert all open's to the 3+ argument form where possible.
* Make it use more core and CPAN modules instead of reinventing code
(e.g. autodie, IPC::System::Simple, IPC::Signal, IO::Pipe, etc…).
* Are there actually still operating systems out there where perl has
SysV behavior for signal handlers? Probably some rather old
installations of SysV derived unices, but I think this is no longer
relevant except maybe in perlport.
* Should SysV IPC be covered at all? I've never seen a Perl program
use it in the wild. Rightly so if you ask me, because using it from
Perl sucks even more than using it from C.

Leon
(Continue reading)

Shlomi Fish | 5 Sep 2010 16:58
Picon
Gravatar

Re: [PATCH] Start revamping perlipc.pod

On Sunday 05 September 2010 08:13:02 Jesse Vincent wrote:
> On Sun, Sep 05, 2010 at 08:03:41AM +0300, Shlomi Fish wrote:
> > Hi all,
> > 
> > Inspired by a message ot the perl documentation proejct, I started
> > working on revamping perlipc.pod here:
> > 
> > http://github.com/shlomif/perl/tree/perlipc-revamp
> > 
> > What I did so far is convert all tabs to spaces (as the indentation was
> > very erratic) and started modernising the code
> 
> Shlomi,
> 
> Thanks for starting to look at perlipc. Is there a chance you could send
> your patch as a series that splits out the whitespace changes from the
> code/prose changes?  Heavy whitespace changes tend to make it much
> harder to review "contentful" changes in a patch, since there are
> so many lines of diff that aren't actually semantically meaningful.
> 
> Thanks,
> Jesse

Thanks to the git history, I can. Here is the tabs->spaces patch and the next 
reply will contain the code/prose changes. I've marked the transition in the 
repository using the «perlipc_pod_after_changing_tabs_to_spaces» tag.

Regards,

	Shlomi Fish
(Continue reading)

Shlomi Fish | 15 Sep 2010 00:42
Picon
Gravatar

Re: [PATCH] Start revamping perlipc.pod

Hi,

sorry for the late response.

On Sunday 05 September 2010 18:22:02 Ævar Arnfjörð Bjarmason wrote:
> On Sun, Sep 5, 2010 at 15:01, Shlomi Fish <shlomif <at> iglu.org.il> wrote:
> > On Sunday 05 September 2010 17:58:54 Shlomi Fish wrote:
> >> On Sunday 05 September 2010 08:13:02 Jesse Vincent wrote:
> >> > On Sun, Sep 05, 2010 at 08:03:41AM +0300, Shlomi Fish wrote:
> >> > > Hi all,
> >> > > 
> >> > > Inspired by a message ot the perl documentation proejct, I started
> >> > > working on revamping perlipc.pod here:
> >> > > 
> >> > > http://github.com/shlomif/perl/tree/perlipc-revamp
> >> > > 
> >> > > What I did so far is convert all tabs to spaces (as the indentation
> >> > > was very erratic) and started modernising the code
> >> > 
> >> > Shlomi,
> >> > 
> >> > Thanks for starting to look at perlipc. Is there a chance you could
> >> > send your patch as a series that splits out the whitespace changes
> >> > from the code/prose changes?  Heavy whitespace changes tend to make
> >> > it much harder to review "contentful" changes in a patch, since there
> >> > are so many lines of diff that aren't actually semantically
> >> > meaningful.
> >> > 
> >> > Thanks,
> >> > Jesse
(Continue reading)

Jacinta Richardson | 15 Sep 2010 03:13
Picon
Favicon
Gravatar

Re: [PATCH] Start revamping perlipc.pod

Shlomi Fish wrote:

>>> -    if ($ <at>  and $ <at>  !~ /alarm clock restart/) { die }
>>> +
>>> +    if ($ <at>  and $ <at>  !~ /alarm clock restart/) { die; }
>> Since you're touching this anyway adding a message to the die would be
>> useful.
> 
> Doesn't it rethrow the exception as it is?

       die LIST

		[....]

               If LIST is empty and $ <at>  already contains a value (typically
               from a previous eval) that value is reused after appending
               "\t...propagated".  This is useful for propagating exceptions:

                   eval { ... };
                   die unless $ <at>  =~ /Expected exception/;

Looks correct to me, although as I hate having to remember/search for special
cases like this, I'd prefer

	if ($ <at>  and $ <at>  !~ /alarm clock restart/) { die $ <at>  }

although this is not technically the same thing.

	J

(Continue reading)


Gmane