in reply to IO::Scalar vs IO::String
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.
--
hiseldl
"Act better than you feel"
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: IO::Scalar vs IO::String
by joe++ (Friar) on Sep 13, 2002 at 14:01 UTC | |
by hiseldl (Priest) on Sep 13, 2002 at 14:15 UTC |
In Section
Seekers of Perl Wisdom