http://qs1969.pair.com?node_id=223222


in reply to Re: Slurp
in thread Slurp

The issue however has to do with the level of knowledge this assumes on the part of the programmer.

I'm still not convinced. Your argument here appears to be "this is appropriate as a module because a beginning programmer would not be saavy enough to write this module."

I don't think that's a good criterion. A beginning programmer wouldn't necessarily know about localizing $/ for sure, nor about wantarray, but would said programmer attempt to write something abstract enough to handle both cases?

I'm also not convinced a beginning programmer would know enough to care about the difference between a function or a static method call. To your credit, the synopsis doesn't expose this, so you've ameliorated that somewhat.

Another consideration is that to use your code, a beginning coder would have to know about the existence of the CPAN, look for something named "slurp", install the module, and realize that error messages coming from your module are the fault of their code (if the file cannot be read).

I find it more likely that a beginning Perl programmer would be able to write the appropriate code before he figures out how to install your module.