in reply to Devel::GetSymbols (fka Symbol::List)

Since this is meant to help people who are developing modules, it should be under the Devel:: namespace. I originally /msg'd this request to Juerd who requested I post it.

Currently, there are tons of modules that are not well named (including some very popular and/or important ones). Symbol.pm and Symbol::Approx::Sub are two of them. There really should be much fewer names at the top of the namespace and "Symbol" is not a good top-level name. I much prefer Devel::ListSymbols for this module (and Net::CGI for CGI.pm, Debug for DB, BackEnd for both B and O, ...).

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
Re: (tye)Re: Symbol::List
by Juerd (Abbot) on Jan 24, 2002 at 04:46 UTC

    Since this is meant to help people who are developing modules

    I never actually stated what it was meant for, except for having a function that returns a list of symbols of a certain type in a certain package. It's useable for exporting, but I actually thought of that one after creating the module (I'd not have bothered with a generic function if I only cared about exporting, I would just have made some extention to Exporter).

    "Symbol" is not a good top-level name

    I think it's a very good name. I think it's logical to group modules by what they do, instead of by who will use it in what kind of script/module.
    LWP::Simple is good, Net::HTTP::LWP::Simple would be bad. XML::Parser is good, Data::XML::Parser would be less good. Etcetera. I think the Symbol top level namespace was a good choice, and I'm glad it exists.
    Symbol::List would need no description, and many people would use it. Devel::SymbolList would indicate it has something to do with development only (we're not calling Exporter Devel::Exporter just because its sole purpose is to ease module development) which scares off some users. This module is not for power users. Power users have always written their own symbol grabbing code, and will probably continue to do so.

    I much prefer Devel::ListSymbols for this module

    The module was made to generate a list of symbols, not to list symbols. But that's a very minor issue.

    2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$

Re: (tye)Re: Symbol::List
by Jouke (Curate) on Jan 24, 2002 at 13:08 UTC
    I completely agree with tye: it should be in the Devel:: namespace. And Juerdje++ for the module!

    Jouke Visser, Perl 'Adept'
    Using Perl to help the disabled: pVoice and pStory
Re: (tye)Re: Symbol::List
by Juerd (Abbot) on Jan 24, 2002 at 14:40 UTC
    Two saints say the Devel:: namespace is the place for this module to be, so I guess I'll have to change that then :)
    How do you feel about the name Devel::Symbols? It's clear, short - and the plural indicates what it does. I'd like to avoid "list", if I'm going to put this outside of Symbol::, and I don't think Devel::Symbol::List would be such a great idea.

    Let me know - reply and tell me what you think.

    2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$

      Hmm. Well. Im a bit dense sometimes but I dont think I would immediately know what the package was for from Devel::Symbols, maybe Devel::PackgeSymbols?

      Just a thought.

      Yves / DeMerphq
      --
      When to use Prototypes?

        I think PackageSymbols is too verbose, as only packages CAN have symbols :).
        It's like having the word "Object" in your object names, or naming every array "@array_foo" (with different foos).

        That's also why i would like to avoid "List" when not using Symbol::. What else would it supply? The name "Symbols" is plural, so you know it'll return multiple things - a list. (Any sane monk would be able to guess it won't return an arrayref :)

        Anyone else pro- or anti-Devel::Symbols?

        2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$

      I don't see anything wrong with Devel::Symbol::List - it's not like it does anything more than this name suggests. To me Devel::Symbols sounds like a big module. If you don't want the extra level of ::, how about Devel::SymbolList?
         larryk                                          
      perl -le "s,,reverse killer,e,y,rifle,lycra,,print"
      
        It's not about the level (the extra ::). I could really not care less, as I'm still working on Telephony::Siemens::X35 (which probably will never be finished).
        It's the use of "List". To me, the word "symbols" already implies a list, because it is plural. Module size and module name have nothing to do with each other. -

        2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$