Skip Menu |

This queue is for tickets about the IO-Socket-IP CPAN distribution.

Report information
The Basics
Id: 117674
Status: open
Priority: 0/
Queue: IO-Socket-IP

People
Owner: Nobody in particular
Requestors: me [...] eboxr.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Lazy load Carp on croak
This is reducing memory footprint of IO::Socket::IP by postponing the load of Carp and also avoiding the global import. View suggested patch at https://github.com/atoomic/IO-Socket-IP/commit/412912958ba3191e877f071de64891dc9429cad7
On Thu Sep 08 19:03:58 2016, atoomic wrote: Show quoted text
> This is reducing memory footprint of IO::Socket::IP > by postponing the load of Carp and also avoiding > the global import. > > View suggested patch at https://github.com/atoomic/IO-Socket- > IP/commit/412912958ba3191e877f071de64891dc9429cad7
I've never been a huge fan of this sort of lazy loading. It might have made sense in the mid-1990s, but RAM is sufficiently cheap and disk spindles sufficiently fast that really there's very little cost to loading modules like Carp. In addition, deferring the loading until later breaks in fantastically hard-to-debug ways in those odd situations such as chroot'ing and similar, where the application simply can't touch disk after it's started up. Such situations are precisely when you do want to rely on good debug logging to work out what's going wrong. -- Paul Evans