OrderProfile — specify files containing order profile definitions
Example: Dedicated directory for profile definitions
A wildcard can be used instead of listing the files individually. Beware of editor working files, backup files, etc., that would be included with a broad file-matching glob of * even though that would be easiest. It's safer to use something like a uniform .profile suffix as in this example:
OrderProfile profiles/*.profile
The actions defined in order profiles can also be used for
mv_click
actions
if the actions are not defined in scratch space. They are accessed by
setting the mv_order_profile
variable to the name of the order
profile.
For the complete discussion, please see the profile glossary entry.
Interchange 5.9.0:
Source: lib/Vend/Config.pm
Line 4817 (context shows lines 4817-4858)
sub parse_profile { my ($var, $value) = @_; my ($c, $ref, $sref, $i); if($C) { $C->{"${var}Name"} = {} if ! $C->{"${var}Name"}; $sref = $C->{Source}; $ref = $C->{"${var}Name"}; $c = $C->{$var} || []; } else { no strict 'refs'; $sref = $Global::Source; ${"Global::${var}Name"} = {} if ! ${"Global::${var}Name"}; $ref = ${"Global::${var}Name"}; $c = ${"Global::$var"} || []; } $sref->{$var} = $value; my (@files) = glob($value); for(@files) { next unless $_; config_error( "No leading / allowed if NoAbsolute set. Contact administrator.\n") if m.^/. and $Global::NoAbsolute; config_error( "No leading ../.. allowed if NoAbsolute set. Contact administrator.\n") if m#^\.\./.*\.\.# and $Global::NoAbsolute; push @$c, (split /\s*[\r\n]+__END__[\r\n]+\s*/, readfile($_)); } for($i = 0; $i < @$c; $i++) { if($c->[$i] =~ s/(^|\n)__NAME__\s+([^\n\r]+)\r?\n/$1/) { my $name = $2; $name =~ s/\s+$//; $ref->{$name} = $i; } } return $c; }