in reply to guidance on naming my first module for CPAN

Hi, thank you for doing the right thing and asking first!

You have three excellent answers, but I'd side with the learned Grandfather over the learned davido on whether or not to create a new top-level namespace. In this case it's certainly not needed as you have the Device:: top-level space, where there are already sub-names representing commercial brands, eg Nest ...

So my humble recommendation, since the software is exclusive to LG, would be that you create a top level package at Device::LG::QuickMemoPlus and put your functions in a subclass Device::LG::QuickMemoPlus::Extract. I find this straightforward and descriptive and that it leaves room for you or other authors to add other packages under the namespace in future.

Hope this helps!

The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^2: guidance on naming my first module for CPAN
by Lotus1 (Vicar) on Jan 24, 2021 at 00:39 UTC

    This is a big help, thank you!

    Your answer brings up a question however. Do I need to do anything special in my package to specify the package name without the name of the pm file? In other words when I submit the folder structure in lib/ stops at QuickMemoPlus. Does that tell CPAN what the top level package is?

    I'm planning to use Minilla to help me make the build file so I was hoping it would handle these things. Maybe this would be a good place to start a new thread for help with Minilla when I get stuck.


    After looking through the modules in the Device namespace I noticed that they are modules used for interfacing to devices. I'm starting to think the Data namespace as others have suggested might be better. It would be nice to have the option of using the module to find the device and get the extract files directly instead of requiring the user to move them somewhere first. I'm going to wait for a few days to let it percolate before I try to upload anything.

      Hi again,

      You'd have in your distribution:

      lib/ lib/Device/ lib/Device/LG/ lib/Device/LG/ lib/Device/LG/QuickMemoPlus/ lib/Device/LG/QuickMemoPlus/
      ... and your package names would start at Device:
      lib/Device/LG/ -> package Device::LG::QuickMemo lib/Device/LG/QuickMemoPlus/ -> package Device::LG::QuickMem +o::Extract

      Hope this helps!

      The way forward always starts with a minimal test.