in reply to subroutine with two names
and then:sub Install_or_Upgrade{....}
If this "Installer" or "Upgrader" is in a module, you just export "install" and "upgrade" and nobody has to know that they do the same thing.sub install { Install_or_Upgrade(); } sub upgrade { Install_or_Upgrade(); }
Update: After awhile, if this is a significant application, the "Upgrader" will become a lot more complex than the "Installer".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: subroutine with two names
by jb113 (Initiate) on Jan 20, 2010 at 03:31 UTC |