in reply to Private variable in class method does not go out of scope
my $data = shift if (@_);
Why type those () around @_?
Since that shift refers to @_ and returns undef if @_ is empty why ask about @_?