The IO :: File, IO :: Socket :: INET modules have some advantages over the direct use of the perl built-in I / O functions, such as having explicit syntax for cleaning the descriptor.
However, they seem to have some drawbacks regarding the built-in I / O functions. For example, as far as I can tell, they cannot be combined with the autodie module to raise exceptions in case of failure, so I have to write more general template code for failing than with the built-in functions.
Is there a way to combine two or some other modules with combined functions? I noticed some limited-purpose I / O modules, such as File :: Slurp, allow more flexible error handling.
I am writing module code, and, ideally, the solution should fully work with perl 5.10.0.
exception perl autodie perl-io
John donough
source share