in reply to Re^2: Centering Text with GD::Image
in thread Centering Text with GD::Image
avoid the indirect syntax in your own code and don't suggest its use to others.
While I agree with the advice, don't be too hard on people who use that notation for GD -- the GD POD shows indirect object notation in their SYNOPSIS and most (‡) of their code snippets where they show using the new or newFromXXX class methods, even when they show correct method-notation just above the example. Given that poor documentation choice, I can understand why users would pick up the indirect object notation (for those who don't know that indirect object syntax is just an alternate, they might reasonably interpret that the indirect object syntax is required for GD, since so many examples show that syntax).
‡: but not quite all: the code snippets in newFromGd2Part and gifanimbegin each show one instance of method-style notation. But those are the only two instances of ->new* that I could find in the main GD POD code snippets. The rest are all indirect object syntax.
--
edit: created issue rt://139961
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Centering Text with GD::Image
by kcott (Archbishop) on Nov 05, 2021 at 06:14 UTC | |
by pryrt (Abbot) on Nov 05, 2021 at 13:56 UTC | |
by hippo (Archbishop) on Nov 05, 2021 at 14:23 UTC | |
by Bod (Parson) on Nov 06, 2021 at 20:14 UTC | |
by kcott (Archbishop) on Nov 09, 2021 at 04:54 UTC | |
by Bod (Parson) on Nov 16, 2021 at 13:45 UTC | |
|
Re^4: Centering Text with GD::Image
by pryrt (Abbot) on Nov 05, 2021 at 19:43 UTC |