in reply to Module Architecture

I had a similar question about updating an existing module's monolithic code. I wanted to add more functionality, but wanted to break apart the functions into submodules.

Perl Module API update or new release

I settled on a new package name Cisco::SNMP since that best described what my module(s) did. All the similar routines (based on Cisco SNMP MIBs) fit under that: Cisco::SNMP::Line, Cisco::SNMP::Entity, etc. This architecture also allows other people to write a Cisco::SNMP::MyModule and it seamlessly "plugs-in" to my Cisco::SNMP top level.

Why the background? 1) Shameless plug, 2) so I have an example case to reference for, 3) all the stuff I learned from this:

Hope some of this helps with your CPAN release planning.

Replies are listed 'Best First'.
Re^2: Module Architecture
by QuillMeantTen (Friar) on Aug 24, 2015 at 18:01 UTC

    This is most helpful indeed, I have recreated my module again and again before managing to create a plan that could be easily expanded on.

    About the top level namespace I thought about using something along the lines of Linux::Net, since security is only used for some offense tools and network for old MSN management code I'm not sure it would be a good idea to use either of those...

      I use Perl almost exclusively on Windows, but the code I write can be used cross-platform - as is the intention for most Perl code. Is your module(s) truly only for Linux? Otherwise, I certainly would not include 'linux' in the distribution name.

        Thing is it will very probably be, depending on the way I implement IPC... Have a look at my dilemna

        Since I dont think an implementation usint unix sockets would be crossplatforms I might be left with named pipes for everything on one host and inet sockets for everything else :(

        Anyway my project is a long way from being done, I have a lot of modules to write to even get the skeleton done so I guess I'll have time to think about it.

        Still, why would it be such a bad idea to start a top level name?