It's ensuring that shift is being evaluated as a function call and not as a literal string. You don't want 'shift' to be seen as a class name, you want it to be evaluated as a function call, and its return value to be used as the class name or object reference.
Examples:
my $object = Classname->new(); # Classname is seen as a class name # and new() is a method of Classname. my $gotten = +subname->new(); # Here subname had better return # either a valid class name or an # object capable of having new() # called as an object method.
Dave
In reply to Re: What is the + in +shift doing here?
by davido
in thread What is the + in +shift doing here?
by tphyahoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |