perl - Function::Parameters - what does "In method ...: missing type name after '['" -


i have problem using module function::parameters types::standard. in code, in person.pm:

package person;  use strict; use warnings; use function::parameters; use types::standard qw(instanceof);  method is_taller_than(   instanceof['person'] $other ) {   return; }  1; 

using perl -cw person.pm reports:

in method is_taller_than: missing type name after '[' @ person.pm line 9. 

how can fix this?

this looks parsing limitation in function::parameters. can handle barewords , square brackets, not quoted strings. way around put parentheses around type expression:

method is_taller_than(   (instanceof['person']) $other ) { 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -