davehorsfall has asked for the wisdom of the Perl Monks concerning the following question:
Most potent, grave, and reverend signiors,
Are there plans to add runtime array bounds checking some time, or perhaps someone has written a module? Such a thing would have gone a long way in helping me with nailing a problem with a 10x10 array, whereby Perl (5.16.3) happily extended rows for me when I forgot to reset the column counter.
I envisage something like:
pragma arraycheck @myarray[10][10];
to enforce under pain of death that @myarray is 10x10, and some way to enable it at runtime from the command line during development.
Ta muchly.
-- Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Array bounds checking
by SuicideJunkie (Vicar) on Sep 09, 2014 at 19:20 UTC | |
by davehorsfall (Novice) on Sep 09, 2014 at 21:16 UTC | |
by AppleFritter (Vicar) on Sep 09, 2014 at 21:22 UTC | |
|
Re: Array bounds checking
by Laurent_R (Canon) on Sep 09, 2014 at 21:20 UTC | |
|
Re: Array bounds checking
by LanX (Saint) on Sep 09, 2014 at 19:32 UTC | |
by davehorsfall (Novice) on Sep 09, 2014 at 21:20 UTC | |
|
Re: Array bounds checking
by GrandFather (Saint) on Sep 09, 2014 at 22:41 UTC |