How to call code in

Hi All,

I’ve put a small subroutine called EmailInMyDomain() into my file. How do I call it from a scrip? I get an error
when I try calling it like:
if ( EmailInMyDomain($email) ) { }
(“Undefined subroutine &RT::Action::UserDefined::EmailInMyDomain …”)

Appreciate any help you can give me on this.


Solving my own problem, but not really answering my own question…

Since I’m trying to call the subroutine from a user-defined action in a
scrip, I added “package RT::Action::UserDefined;” before the subroutine
header so that it’s in the same context as the scrip.

My question still stands, however. What package name would code in the file be referenced as?


Gene LeDuc wrote: