[html-formfu] password processing

Octavian Rasnita orasnita at gmail.com
Tue Jan 26 17:59:07 GMT 2010


Hi Carl,

> From: "Carl Franks" <
fireartist at gmail.com>

>
>> 2010/1/24 Alex Povolotsky <
tarkhil at over.ru>:

>>> Hello!
>>>
>>> I'm going to implement reusable password processing - comparing two
>>> password
>>> fields and setting proper value in form to some hash.
>>>
>>> I guess it's best to be used with HTML::FormFu::Transformer ; maybe
>>> someone
>>> have expirience to share and/or suggestions to make?
>>
>> You can use any subroutine from any cpan Digest::* module, with
>> something such as this:
>>
>> transformer:
>>  type: Callback
>>  callback:: "Digest::MD5::md5_hex"
>>
>> This will essentially do:
>>    $new_value = Digest::MD5::md5_hex( $value );
>>
>> Just make sure that you have a "use Digest::MD5" somewhere in any code
>> that uses it.
>>
>> Carl

Can you give us a short example of a custom-made transformer?

I am thinking to make one which looks like:

<model_config>
  resultset TableName
</model_config>

<elements>
  name foo
  <transformers>
    type MyApp::TransformerName
  </transformers>
</elements>

And in that transformer I would like to be able to get the name of the
resultclass (TableName), the Catalyst context variable (probably done like
in validators), and the hashref with the form fields and their values.

I intend to create a Transformer that uploads the files uploaded in a File
field.

I just need a short example, so please tell me if there is one somewhere.

Thanks.

Octavian




More information about the HTML-FormFu mailing list