FAQ
The following module was proposed for inclusion in the Module List:

modid: Set::ArrayAlt
DSLIP: RdpOp
description: full set of list/set operations
userid: SBECK (Sullivan Beck)
chapterid: 6 (Data_Type_Utilities)
communities:

similar:
Set::Array

rationale:

The origin of this module came when I needed better list handling
operations (especially involving lists that might contain duplicate
elements) inside of a Template::Toolkit template. The built in list
functions in Template::Toolkit weren't sufficent for my needs, so I
looked around.

The module that came closest to my needs was Set::Array. Although
not a perfect match for what I wanted, it came close enough, so I
wrote a wrapper module (Template::Plugin::ListOps) around it to do
most of what I wanted.

Unfortunately, I discovered almost immediately that Set::Array
suffered from a fairly serious problem. It depends on the Want
module which, at the time, had some known problems and would fail
under some circumstances (older versions of perl if I recall
correctly, though I could be wrong about that), and unfortunately,
some of the places I needed my module to run failed due to those
problems.

I looked at the Want module, but correcting it was beyond my
abiltity, so the best solution seemed to be to rewrite the module
without depending on Set::Array. This would also allow me to add the
functionality that I wanted.

So I did that. I rewrote each function to do the list/set operation
I wanted instead of calling a Set::Array functions.

That modules (Template::Plugin::ListOps) was registered in PAUSE
and has been available sinc 2007.

As I was completing the module, I was already regretting rewriting
the module in that way. I should have written a standalone module to
do the operations (basically, a replacement for the Set::Array
module) and then had the Template::Plugin::ListOps be a wrapper for
it .

In 2009, I ran into a case where I wanted the set/list
functionality from Template::Plugin::ListOps for another application
outside of a Template. So, I took all of the functions from
Template::Plugin::ListOps and moved them into a separate module
which just does list/set operations, and trivially rewrote
Template::Plugin::ListOps to call the functions in the new module.

In early 2009, I released the new module (under the name
Set::ArrayAlt) and a new version of Template::Plugin::ListOps (which
has the unregistered module Set::ArrayAlt as a dependancy). I'd like
to correct that issue by registering the Set::ArrayAlt module.

This module is named Set::ArrayAlt to indicate that it is based on
Set::Array, but with a number of changes. It has enhanced
functionality with respect to duplicate elements but is missing some
of the functionality of Set::Array (especially method chaining and
operator overloading) which depend on the Want module. This module
is not intended to be a drop-in replacement for Set::Array.

It may well be that the problems with the Want module have been
corrected at this point, and that I could have used Set::Array, but
since the functionality has existed (first in
Template::Plugin::ListOps, and later in the unregistered
Set::ArrayAlt module), I have never wanted to go back and rewrite
the modules (especially since I'd lose the enhanced duplicate
element handling).

Anyway, that's the history. Hopefully, I was justified in
reinventing the wheel, and at this point, I'd just like to register
the name so that the registered module Template::Plugin::ListOps
does not have an unregistered module for a dependancy.

enteredby: SBECK (Sullivan Beck)
enteredon: Tue Feb 9 18:29:34 2010 GMT

The resulting entry would be:

Set::
::ArrayAlt RdpOp full set of list/set operations SBECK


Thanks for registering,

Search Discussions

  • Brian d foy at Feb 13, 2010 at 11:30 am
    [[ This message was both posted and mailed: see
    the "To," "Cc," and "Newsgroups" headers for details. ]]

    In article <201002091829.o19ITYu6004854@pause.fiz-chemie.de>, Perl
    Authors Upload Server wrote:
    The following module was proposed for inclusion in the Module List:

    modid: Set::ArrayAlt
    DSLIP: RdpOp
    description: full set of list/set operations
    userid: SBECK (Sullivan Beck)
    chapterid: 6 (Data_Type_Utilities)
    communities:
    This module is named Set::ArrayAlt to indicate that it is based on
    Set::Array, but with a number of changes.
    I think that's one of the least concerns for naming this module. Since
    you rewrote anything, the connection is merely historical, right?

    Is there another name that you might like to use?

    --
    brian d foy (one of many PAUSE admins), http://pause.perl.org
    PAUSE instructions: http://pause.perl.org/pause/query?ACTION=pause_04about
    Archives: http://www.xray.mpe.mpg.de/mailing-lists/modules
    Please send all messages back to modules@perl.org with no CC to me.
  • Sullivan Beck at Feb 13, 2010 at 12:42 pm

    On 2/13/2010 6:30 AM, brian d foy wrote:
    [[ This message was both posted and mailed: see
    the "To," "Cc," and "Newsgroups" headers for details. ]]

    In article<201002091829.o19ITYu6004854@pause.fiz-chemie.de>, Perl
    Authors Upload Serverwrote:

    The following module was proposed for inclusion in the Module List:

    modid: Set::ArrayAlt
    DSLIP: RdpOp
    description: full set of list/set operations
    userid: SBECK (Sullivan Beck)
    chapterid: 6 (Data_Type_Utilities)
    communities:
    This module is named Set::ArrayAlt to indicate that it is based on
    Set::Array, but with a number of changes.
    I think that's one of the least concerns for naming this module. Since
    you rewrote anything, the connection is merely historical, right?

    Is there another name that you might like to use?
    Frankly, I'm not attached to this or any other name. I certainly don't
    mind keeping this name (both as a nod to Array::Alt, and due to the fact
    that it's been released as an unregistered module for a year now). So if
    you're willing to register it as-is, I think that's probably best.
    However, if there's a different name that you'd prefer, that would be
    fine too.

    Thanks
  • Sullivan Beck at Feb 15, 2010 at 1:26 pm

    On 02/13/2010 06:30 AM, brian d foy wrote:
    [[ This message was both posted and mailed: see
    the "To," "Cc," and "Newsgroups" headers for details. ]]

    In article <201002091829.o19ITYu6004854@pause.fiz-chemie.de>, Perl
    Authors Upload Server wrote:

    The following module was proposed for inclusion in the Module List:

    modid: Set::ArrayAlt
    DSLIP: RdpOp
    description: full set of list/set operations
    userid: SBECK (Sullivan Beck)
    chapterid: 6 (Data_Type_Utilities)
    communities:
    This module is named Set::ArrayAlt to indicate that it is based on
    Set::Array, but with a number of changes.
    I think that's one of the least concerns for naming this module. Since
    you rewrote anything, the connection is merely historical, right?

    Is there another name that you might like to use?
    If you'd prefer that I use a different name, how about:
    Set::ListOps
    Set::Operations
  • Brian d foy at Feb 23, 2010 at 8:46 pm
    [[ This message was both posted and mailed: see
    the "To," "Cc," and "Newsgroups" headers for details. ]]

    In article <4B794BF3.2010905@gmail.com>, Sullivan Beck
    wrote:
    On 02/13/2010 06:30 AM, brian d foy wrote:
    [[ This message was both posted and mailed: see
    the "To," "Cc," and "Newsgroups" headers for details. ]]

    In article <201002091829.o19ITYu6004854@pause.fiz-chemie.de>, Perl
    Authors Upload Server wrote:

    The following module was proposed for inclusion in the Module List:

    modid: Set::ArrayAlt
    DSLIP: RdpOp
    If you'd prefer that I use a different name, how about:
    Set::ListOps
    Set::Operations
    I think I'm just missing the point of your module. Based on what I see
    in the documentation, I don't think you are actually working with sets
    (and neither is Set::Array) in the expected sense of that word.

    http://mathworld.wolfram.com/Set.html

    It looks like you merely have something that gives you array and list
    operations on an arrayref.

    Maybe Array::AsObject would work.

    --
    brian d foy (one of many PAUSE admins), http://pause.perl.org
    PAUSE instructions: http://pause.perl.org/pause/query?ACTION=pause_04about
    Archives: http://www.xray.mpe.mpg.de/mailing-lists/modules
    Please send all messages back to modules@perl.org with no CC to me.
  • Sullivan Beck at Feb 23, 2010 at 9:13 pm

    On 2/23/2010 3:46 PM, brian d foy wrote:
    [[ This message was both posted and mailed: see
    the "To," "Cc," and "Newsgroups" headers for details. ]]

    In article<4B794BF3.2010905@gmail.com>, Sullivan Beck
    wrote:

    On 02/13/2010 06:30 AM, brian d foy wrote:

    [[ This message was both posted and mailed: see
    the "To," "Cc," and "Newsgroups" headers for details. ]]

    In article<201002091829.o19ITYu6004854@pause.fiz-chemie.de>, Perl
    Authors Upload Serverwrote:


    The following module was proposed for inclusion in the Module List:

    modid: Set::ArrayAlt
    DSLIP: RdpOp
    If you'd prefer that I use a different name, how about:
    Set::ListOps
    Set::Operations
    I think I'm just missing the point of your module. Based on what I see
    in the documentation, I don't think you are actually working with sets
    (and neither is Set::Array) in the expected sense of that word.

    http://mathworld.wolfram.com/Set.html

    It looks like you merely have something that gives you array and list
    operations on an arrayref.

    Maybe Array::AsObject would work.
    It's certainly a hyrbrid at best. Both Set::Array and my module DO do
    set operations (for example, there are methods named difference,
    intersection, union, etc. which definitely do set operations; but there
    are other operations which treat the array as a traditional list).

    So, Array::AsObject works fine for me. I'll go ahead and register that.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmodules @
categoriesperl
postedFeb 9, '10 at 6:31p
activeFeb 23, '10 at 9:13p
posts6
users4
websitecpan.org...

People

Translate

site design / logo © 2021 Grokbase