develooper Front page | perl.perl5.porters | Postings from August 2016

[perl #128685] Repeated installs broken in blead

From:
Tony Cook via RT
Date:
August 1, 2016 04:56
Subject:
[perl #128685] Repeated installs broken in blead
Message ID:
rt-4.0.18-14284-1470027389-1930.128685-15-0@perl.org
On Fri Jul 22 16:00:05 2016, aristotle wrote:
> * Tony Cook via RT <perlbug-followup@perl.org> [2016-07-22 06:12]:
> > -    $sed 's|^\(.*\$(OBJ_EXT):\) *\(.*/.*\.c\) *$|\1 \2; '"$defrule
> > \2|" .deptmp \
> > -       >>$mf.new
> > +    $sed -n -e 's|^\(.*\$(OBJ_EXT):\) *\(.*/.*\.c\) *$|\1 \2;
> > '"$defrule \2|" -e p \
> > +       -e '/^miniperlmain/{' -e 's/mini//' -e p -e '}' \
> > +       .deptmp >>$mf.new
> 
> You can combine         -e p -e '/^miniperlmain/{' -e 's/mini//' -e p
> -e '}'
> into                    -e 'p; /^miniperlmain/{ s/mini//; p; }'
> 
> If you reverse order inside the block you can drop the `-n` switch and
> one explicit `p`:
>                         -e '/^miniperlmain/{ p; s/mini// }'
> 
> If it’s acceptable to reverse the order of lines for that case, then
> you
> can also avoid the repeated pattern match by using the `/p` flag and
> the
> hold space:
>                         -e 'h; s/mini\(perlmain\)/\1/p; g'
> 
> In total:
> 
> $sed -e 's|^\(.*\$(OBJ_EXT):\) *\(.*/.*\.c\) *$|\1 \2; '"$defrule \2|"
> \
>    -e 'h; s/mini\(perlmain\)/\1/p; g' \
>    .deptmp >>$mf.new

Thanks, applied as d58d97f6763c77718dffaa4394087658d7401361

Tony


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=128685



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About