in reply to Problem calling a function with name stored into scalar

Did you read the error message?

Undefined subroutine &Module::Configurable::is_int

so

Module::Configurable::is_int

doesn't exist. It's not a problem with the call itself.

Update:

Since you call Module::Configurable::is_int on the previous line, something is fishy. Maybe some kind of namespace cleaning?

Replies are listed 'Best First'.
Re^2: Problem calling a function with name stored into scalar
by tj_thompson (Monk) on Jun 10, 2011 at 23:04 UTC
    Sure...but notice that right above it I'm able to use that function name:
    print STDERR "(Module::Configurable::is_int) TRUE!\n" if Module::Configurable::is_int(42, 1);
    Output:
    (Module::Configurable::is_int) TRUE!
      Yeah, see my update. &Module::Configurable::is_int existed at compile-time, but not at run-time.
        Oh, good call on the namespace cleaning! Module::Configurable is a Moose role that is being consumed by the class I'm using for test. I'm using namespace::autoclean in both modules though. I'm now betting I shouldn't be using that in the Module::Configurable role. I'll check it out.
        You nailed it ike. After removing the namespace::autoclean use statement in the role, the test code now works as expected. Many thanks for the help late on a Friday and have a great weekend :)