in reply to Incorrect number of values in list assignment

You'd have to write a custom op and install that with a special pragma to get the scoping right (and checking the pragma hints is the most difficult part in the custom op), but it's doable for someone with XS skills. I'm sure it'd break a lot of code though.

  • Comment on Re: Incorrect number of values in list assignment

Replies are listed 'Best First'.
Re^2: Incorrect number of values in list assignment
by szabgab (Priest) on Sep 06, 2010 at 08:48 UTC
    I wonder if it would be possible to add optional warnings so the behavior of "use warnings" won't change but I'd be able to turn this warning on. Maybe with an additional line of "use warnings 'count_elemnts'".

      Sure, that's even easier to implement than a custom op—probably a dozen lines of code. I don't know if p5p would favor it though.