Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
If you need to use IO::Scalar in more than one place, and you want to keep IO::String in mind for later, you could wrap the call in a subroutine, and then if IO::Scalar is deprecated, or you just want to switch to IO::String, you can just change the one instance in your subroutine wrapper.
It adds the overhead of an extra subroutine call, but if I am relying on someone else's code, I have found it to be good practice to wrap it in my own method call so that later if the 3rd party code changes, I only have to change one place. The change can be to swap out the code for another 3rd party solution, or to write it myself. --
In reply to Re: IO::Scalar vs IO::String
by hiseldl
|
|