Perl

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Dual life for Shell.pm

    5 answers - 1051 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    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.
    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.
    Attached is a patch of the new Shell.pm and Shell.t against blead
    sources. The changes are two:
    - tabs to spaces in sources
    - using closures rather than eval "string"
    Regards,
    Adriano Ferreira
  • No.1 | | 1261 bytes | |

    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)

    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.

    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
    - using closures rather than eval "string"
  • No.2 | | 2073 bytes | |

    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.
  • No.3 | | 532 bytes | |

    06/07/06, Adriano Ferreira <a.r.ferreira (AT) gmail (DOT) comwrote:

    The attached patch bumps the version to 0.7, consistent with the
    size/nature of the changes against the last sources.

    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.

    Thanks, applied as change #28502 to bleadperl.
  • No.4 | | 168 bytes | |

    Fri, Jul 07, 2006 at 04:53:46PM +0200, Rafael Garcia-Suarez wrote:
    Thanks, applied as change #28502 to bleadperl.
    This cleans up the pod for this change.
  • No.5 | | 533 bytes | |

    10/07/06, Rick Delaney <rick (AT) bort (DOT) cawrote:
    This cleans up the pod for this change.

    Actually I applied this as #28522, after having used podchecker:

    //depot/perl/lib/Shell.pm#23 (text)

    @@ -34,6 +34,8 @@

    =begin private

    +=over
    +
    =item B<_make_cmd>

    $sub = _make_cmd($cmd);
    @@ -41,6 +43,10 @@

    Creates a closure which invokes the system command C<$cmd>.

    +=back
    +
    +=end private
    +
    =cut

    sub _make_cmd {
    End.

Re: Dual life for Shell.pm


max 4000 letters.
Your nickname that display:
In order to stop the spam: 3 + 2 =
QUESTION ON "Perl"

EMSDN.COM