Your modifier should be called Petal::Hash::<SomeThing>, where <SomeThing>
is the name that you want to give to your modifier.
For example, this modifier is called Petal::Hash::Test. Petal will
automatically pick it the module up and assign it the test: prefix.
The method CW$class->process ($hash, CW$argument);
This class method will define the modifier in itself.
* $class is the package name of your modifier (which might come in
handy if youre subclassing a modifier),
* $hash is the execution context, i.e. the objects and data which
will fill your template,
* $argument is whatever was after your modifiers prefix. For example,
for the expression test:foo bar, $argument would be foo bar.
In this test / tutorial were going to write a modifier which
uppercases a Petal expression.
my $class = shift;
my $hash = shift;
my $argument = shift;
return uc ($hash->get ($argument));
And thats it! Simple!