Here is an example for the format of a package:
package provide shmc_email [lindex {Revision: 1.0 } 1]
namespace eval shmc_email {
namespace export email
proc email {aEmail aSubject aMessage} {
….
}
}
Here is how to use/call the package from another tcl script:
package require shmc_email
if [catch {shmc_email::email $email $subject $message} err] {
echo “Error Calling SHMC_Email –$err”
}
You will need to add the package file to the ../../integrator/tclprocs/lib directory.
Also, add a line to the pkgIndex.tcl file so the system knows about the package:
package ifneeded shmc_email 1.0
]
I hope this helps. It’s been a few months since I’ve done one and while mine works, it may not be the exact way others do it.
Nate.