Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I agree. A module should always use its own methods over accessing private data whenever possible. This is especially true for subs that clean data on the way in, or when using lvalues.

    A quick example... sub custnum(value) does sanity checking on the value passed in. Now, any code in that same module can save directly to $self->{customnum}, but they miss the sanity checking code.

    I think there is afine line in there. IT all depends on the data being set, and if there are any data manips/check that should happen beefore setting the data.
    • For me, it simply removes an extra pair of braces, thereby making the code read a lot more easily. All the rest are side benefits. :-)