in reply to perl calls unexpected function

It's impossible to say for sure with the limited information you've given us but I'll hazard a guess. I suspect that your X.pm doesn't have a package statement. That would cause your funcB subroutine to be redefined when you require X from within your other module.

One way to help yourself find these kinds of errors is to run with warnings enabled. I suggest you do so and, if perl spits out a warning like:

Subroutine FuncB redefined at X.pm line 42.
then my guess may well be right.

-sauoq
"My two cents aren't worth a dime.";