If you conform to perl's conventions, that is, to have each package in its own file in the proper directory and file names, you may find autopackage to your liking instead of trying to build it yourself. It probably could be extended to include a sub-package name, too, which would give you something like:

use autopackage 'A'; # == package My::A;
I'm not entirely sure that's a great idea, but that doesn't mean I wouldn't do it. PRs accepted :)


In reply to Re: Name of subpackage dependent on main package by Tanktalus
in thread Name of subpackage dependent on main package by Dirk80

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":