What do you mean by package? There are scripts, modules and distributions. You used require, so it better be a module. If it's not a module, it doesn't make sense to use require or use. It's a bug.
Why did you revert the extension change? It confuses your readers and maintainers. It also forces you to use require instead of use. Not only is that really unusual, it serves no benefit and it causes a number of issues.
Why did you remove the file name from the message? It would have solved your original problem if the error message had included the file name. It helps elsewhere too.
Why did you add the line number to the IO message (by removing the "\n"). If your program can't open the file because it wasn't found or because of a permission problem or for any other reason, the person reading the message has no need to know the error occurred at line 11 of your module to fix the problem.
Why did you move use strict; and use warnings; into the sub, effectively turning them off for the rest of the module.
Why did you move the output back into the reader? That makes no sense.
In reply to Re^3: Perl Packages Issue in a script.
by ikegami
in thread Perl Packages Issue in a script.
by Irishboy24
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |