|Perl: the Markov chain saw|
Re^2: Centering Text with GD::Imageby kcott (Bishop)
|on Nov 04, 2021 at 04:31 UTC||Need Help??|
I recall this (or very similar) code from various questions you were asking some months ago. In isolation, this could be quite confusing; consider labelling it as an extract and then adding a link back to the original code to provide more context. However, that's the least of my issues with your post.
Of far greater concern, is posting code like:
Please read "perlobj: Invoking Class Methods" in general; and specifically the "Indirect Object Syntax" subsection. Note the emboldened "use of this syntax is discouraged"; and later "We recommend that you avoid this syntax". Reasons are given later in that subsection.
I don't recall your original code in any detail which makes suggesting an absolute fix impossible. Maybe replace both lines with something closer to:
Or perhaps create one generic, reuseable object:
There's potentially other ways to handle this, such as returning @bounds from a subroutine; however, please avoid the indirect syntax in your own code and don't suggest its use to others.