in reply to Defining a function in the caller's package

Hi ,

I'm no expert on this sort of thing but ...

Opens mouth and prepares to insert foot ...

I think that the initial problem was/is down to the context of the anonymous sub declaration - the Master package - as reported by the initial run.

Your subsequent use of eval changed the context to that of the useing package i.e. Slave, as required and thus you solved your problem - as you pointed out.

There now, I think I've put my foot in it enough ... ;-)

A user level that continues to overstate my experience :-))