Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Choosing namespace/name for (my first) CPAN module which is a sub-class of a well-known distribution

by Anonymous Monk
on Nov 13, 2024 at 10:12 UTC ( [id://11162674]=note: print w/replies, xml ) Need Help??


in reply to Choosing namespace/name for (my first) CPAN module which is a sub-class of a well-known distribution

Thanks, everyone, for advice and encouragement. Eh-m, back to ground zero (been asked to drop the acronym), is PDF::Manipulate (rather, PDF::Manipulate::X) an OK name? (Contra: Verb as 2nd term? Too long? Negative connotations?) I considered "Parser", or "Wielder", or "ReadWrite", but like them even less. "Manipulate" is in the very 1st sentence on CAM::PDF pod page. In essence, I consider (and use) CAM::PDF as low level parser and manipulator with few high level methods, a tool for other developers to make (high level) tools.

Why "X"? PDF::CAMPDF::X would have eXtended CAM::PDF to serve as drop-in replacement in any existing code. PDF::CAMPDF::X2 would, in turn, subclass it but get rid of CAM::PDF::Node (blessed-for-no-reason constant-keys-set hashrefs) and use arrayrefs for "nodes". An exploration at first, how much of a performance boost that would add. Would be advised for new code, can't serve as drop-in CAM::PDF replacement. Because see e.g. line#82, and many more, in CAM::PDF::Annot accessing "{value}"; poking inside "nodes" is all over any code using CAM:PDF.

So then the idea now is to have PDF::Manipulate::X and PDF::Manipulate::X2 in the same distribution and kind of on "same depth level". Unless, that is, strongly advised not to. I'll think about how to properly and carefully document everything.

  • Comment on Re: Choosing namespace/name for (my first) CPAN module which is a sub-class of a well-known distribution
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: Choosing namespace/name for (my first) CPAN module which is a sub-class of a well-known distribution
by hippo (Archbishop) on Nov 13, 2024 at 10:28 UTC
    is PDF::Manipulate (rather, PDF::Manipulate::X) an OK name? (Contra: Verb as 2nd term? Too long? Negative connotations?)

    "Manipulate" seems OK to me. If you think it is overly long then "Manip" is also fine (See Date::Manip, Bit::Manip, et al).

    I considered "Parser", or "Wielder", or "ReadWrite", but like them even less.

    Simply, "Edit"?

    Honestly, it's the ::X and ::X2 which are slightly more confusing anyway. I would probably be more inclined to go with PDF::Foo::Compat for the drop-in replacement one and just PDF::Foo for the forward-looking one (where Foo is one of Manipulate/Manip/Edit/...). How does that sound?


    🦛

      Thank you very much, hippo, I like PDF::Manip a lot. Somehow modules you mentioned slipped my mind, and metacpan's search for "Manipulate" didn't show them in the 1st hundred. Very respectful company for my distribution, then :-). Edit is not so apt, because "editing" may falsely imply the ability to e.g. "search for word 'Perl' and make its font bold-faced". I also see good reasons/logic for having Compat in module's name. Originally I intended (restoring for a moment the previous name-set) to have PDF::CAMPDF::X in Synopsis, etc., and only later/gradually advise to use X2 in new code. For usual/small PDF files, X2 is not much of an advantage, and less confusion to learn the difference. But now I see perhaps you are right, I owe fair amount of explaining to would-be users anyway.

Re^2: Choosing namespace/name for (my first) CPAN module which is a sub-class of a well-known distribution
by sleet (Scribe) on Nov 13, 2024 at 14:07 UTC
    Consider ::Manip over ::Manipulate, since it's more common among other CPAN modules.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11162674]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2025-01-24 15:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (68 votes). Check out past polls.