Su::Process - A module to generate and execute user process.
use Su::Process;
# Generate the Process file.
generate_proc('pkg/SomeProc');
# Execute the Process and get it's result.
$ret = gen("pkg/SomeProc"); $ret = comp("pkg/SomeProc");
Su::Process has a method to generate the template of the Process module to describe user process. These Processes are called from the method Su::resolve. The user Processes are also called directry by the method Su::Process::gen. The method Su::Process::comp is an alias of the method Su::Process::gen for embed to the template like a component.
$SUPRESS_LOAD_ERROR
For suppress the load error because of the specified module file is not found.
$Su::Process::SUPPRESS_LOAD_ERROR = 1;
A Constructor.
This function is just a synonym of the method generate_proc.
Generate the Process file to describe your own code in the method 'process'. This method can be used from the command line like the following.
perl -MSu::Process -e '{generate_proc("MainProc")}'
If generation is success, this subroutine return the generated file name, else should die or return undef.
This method is just a alias of gen metnod.
my $ret = gen('process_id'); my $ret = gen('dir/process_id'); my $ret = gen('dir::process_id');
Return the result of the process which coressponds to the passed process id. The process id is a qualified module name. Note that the specified process is simply called it's process method and can't access to it's model field.
process
my $su_proc = Su::Process->new; my $proc_module = $su_proc->load_module($module_name);
To install Su, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Su
CPAN shell
perl -MCPAN -e shell install Su
For more information on module installation, please visit the detailed CPAN module installation guide.