in reply to Re^2: How not to hardcode a package name?
in thread How not to hardcode a package name?

True, but realize that when your codebase get larger, you may want to put the 'Array::Extract::Work' code in its own file, and you'll have the package name "hardcoded" in four different places: 1) the pathname of the file containing the Array::Extract::Work package; 2) the package statement in said file; 3) the use statement that tells perl to compile the code in the file; 4) the reference in the import routine.

Be careful to not pick a solution that later on makes it harder to separate out the Array::Extract::Work to its own file.

  • Comment on Re^3: How not to hardcode a package name?