in reply to Calling locally manufactured (typeglob) methods

Never mind, this example doesn't seem to adequately express the problem I'm having. It looks like manufacturing the methods with just numbers as names is causing the problem for me in this case.
perl -e 'split//,q{john hurl, pest caretaker}and(map{print @_[$_]}(joi +n(q{},map{sprintf(qq{%010u},$_)}(2**2*307*4993,5*101*641*5261,7*59*79 +*36997,13*17*71*45131,3**2*67*89*167*181))=~/\d{2}/g));'

Replies are listed 'Best First'.
Re^2: Calling locally manufactured (typeglob) methods
by diotalevi (Canon) on Apr 05, 2007 at 17:06 UTC

    I can only imagine what the problem is since you didn't describe it but I am guessing that perhaps you goofed by returning $_ instead of $method. $_ is a global and when you call it will have values unrelated to the 0..9 you named your methods after.

    I would like to offer you a bit of hope in your method names. In theory, you can name your methods just about anything. Your calling syntax may not be pleasant or usual but it does not become impossible just because your identifers no longer match /^[_[:alpha:]]\w*\z/ or /^\p{IdStart}\p{IdContin}*\z/.

    $method = '1'; $obj->$method; # Works! $obj->1; # Doesn't work!

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊