in reply to Changing a subroutine to a module
When you convert it to a shared sub, you may want to consider using named parameters when you pass in variables. This makes it much easier to change things in the future without breaking a bunch of code that is relying on the position of passed in variables.
There is a good section on named parameters in Effective Perl Programming. Basically, you pass a hash into the sub rather than an array and pull the parameters off as a hash.
|
|---|