You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I dig further into Perl programming advice, one consensus is that
use warnings;
use strict;
should always be present.
Since these are commented out in most of the files, I'm guessing HSW12 had tried using these at one point. But after attempting to enable these again I quickly found why they were probably left disabled.
Of the hundreds of 'errors' that appear if I try enabling them:
Most are regarding the typeglobs used as constants, e.g.:
Variable "$parse_display_regs" is not imported at .\hsw12_pod.pm line 804.
...
Global symbol "$parse_display_regs" requires explicit package name (did you forget to declare "my $parse_display_regs"?) at .\hsw12_pod.pm line 804.
I think Readonly (which is readily available from package managers) should work, whereas use constant has known limitations.
Similar errors regarding variables that aren't declared as my or are being declared twice; some of these I already committed fixes for. Some of these are typos/mispellings; these are understandable, and often there is correct spelling in use as well. But for hsw12_asm.pm (which I haven't spent as much time looking through before), I'm wondering if there's an issue where fixing those spelling issues might change the functionality.
Just writing this to document what I'm up to. I'm not stuck yet, but would be curious if this is something that's been looked into before or had encountered issues with.
The text was updated successfully, but these errors were encountered:
"use warning" and "use strict" are just disabled out of laziness. As long as my Perl code was interpreted correctly, I was fine with using the quickest way to implement it.
As I dig further into Perl programming advice, one consensus is that
should always be present.
Since these are commented out in most of the files, I'm guessing HSW12 had tried using these at one point. But after attempting to enable these again I quickly found why they were probably left disabled.
Of the hundreds of 'errors' that appear if I try enabling them:
I think Readonly (which is readily available from package managers) should work, whereas
use constant
has known limitations.my
or are being declared twice; some of these I already committed fixes for. Some of these are typos/mispellings; these are understandable, and often there is correct spelling in use as well. But for hsw12_asm.pm (which I haven't spent as much time looking through before), I'm wondering if there's an issue where fixing those spelling issues might change the functionality.Just writing this to document what I'm up to. I'm not stuck yet, but would be curious if this is something that's been looked into before or had encountered issues with.
The text was updated successfully, but these errors were encountered: