7/6/06, Rafael Garcia-Suarez <rgarciasuarez (AT) mandriva (DOT) comwrote:
Adriano Ferreira wrote:
I have taken a look at Shell.pm and decided to ask if it would be
interesting to raise it to dual life: CPAN releases coexisting with
the life in core. Towards this end, I prepared a Shell-0.6
distribution with the source as it is in perl-current (lib/Shell.pm
and lib/Shell.t) plus the other common distribution files
(Makefile.PL, MANIFEST, etc.).
The next step that the code suggested me was to rewrite it to use
closures rather than C<eval "string"as it does now to magically
create subroutines tied to system commands. This is incorporated into
a Shell-0.61 distribution.
Nice. (even though 0.61 0.6 for all usual version comparison
algorithms, 0.7 would have felt more natural)
The attached patch bumps the version to 0.7, consistent with the
size/nature of the changes against the last sources.
If there is any interest, I would like to be a co-maintainer of the
module, so I can upload it to CPAN. I know Shell.pm is a show case and
maybe the porters would rather prefer to leave it alone.
You don't need to be a comaintainer for that.
So I would like to upload 0.6 for historical bookkeeping and wait
for your thumbs up on the new version. (Will it index correctly?)
Attached is a patch of the new Shell.pm and Shell.t against blead
sources. The changes are two:
- tabs to spaces in sources
That makes it more difficult to review
But going from eval "string" to closures, I had to change many
lines because the interpolated string used a bunch of escapes (\$, \@)
which were gone in the closure. Given this, I thought it would be a
good opportunity to touch the tabs issue as well.
I produced a patch (shell.diff) that should be easier to review (with
only the migration to using a closure) and then a patch (tab.diff)
with only the conversion from tabs to spaces.
Thanks.
Adriano Ferreira.