Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: guidance on naming my first module for CPAN

by Lotus1 (Vicar)
on Jan 24, 2021 at 00:39 UTC ( [id://11127353]=note: print w/replies, xml ) Need Help??


in reply to Re: guidance on naming my first module for CPAN
in thread guidance on naming my first module for CPAN

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 Device::LG::QuickMemoPlus::Extract.pm 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.

Update:

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.

Replies are listed 'Best First'.
Re^3: guidance on naming my first module for CPAN
by 1nickt (Canon) on Jan 24, 2021 at 00:53 UTC

    Hi again,

    You'd have in your distribution:

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

    Hope this helps!


    The way forward always starts with a minimal test.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2024-04-18 15:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found