This is from a class constructor (“new”); it is setting the class hash variable ‘Post” to a subroutine that was passed in ($args{‘Post”}). If that is false or not defined, then it sets the class variable ‘Post’ to sub {1;}. This is where I am lost. What is sub {1;} ? A forward declaration to a subroutine which is… ??? I am guessing that { ;} is part of the sub declaration and not a hash, but I can’t remember what “1” should represent. Or maybe this is something else entirely.$self->{'Post'} = ($args{'Post'} or sub {1;});
In reply to what is sub {1;} by mlgvalt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |