On Fri, 3 Dec 2021 20:58:53 +0100 Juerd Waalboer <juerd@tnx.nl> wrote: > However, it seems to me that there should be a better, and officially > supported, way to do this. Yeah I was probably going to make something like `builtin::argc`, to give you a way to enquire: use builtin 'argc'; sub bar($self, $new = "blah") { $self->{bar} = $new if argc == 2; $self->{bar}; } -- Paul "LeoNerd" Evans leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/Thread Previous | Thread Next