Re: Safe list assignment
[email protected] ("Chas. Owens")
| Newsgroups | perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
On Tue, May 27, 2008 at 8:06 AM, Ed Avis <[email protected]> wrote: snip > But my question is, is there a standard way to do this? Like a CPAN module that provides a concise and clear syntax to do safe list assignments. It seems like it should be a pretty common operation. Ideally, 'use warnings' would give a runtime warning when the LHS and RHS don't match up. snip Not to my knowledge. In general it doesn't come up. Most people use the ability of list assignment to ignore extra values as a feature. There are quite a few parameter passing modules, but the last time I checked they all add significant overhead. snip > If there isn't a consensus on the recommended way to do this (in the same way that Carp is the recommended way to give error messages, File::Slurp is the recommended way to read a whole file, etc) then I may try to make one. snip Go for it. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read.