easy filters:
package myApp::View::TT;
use strict;
use base 'Catalyst::View::TT';
__PACKAGE__->config(
{
CATALYST_VAR => 'catalyst',
...
FILTERS => {
yesno => sub {
$_[0] ? 'yes' : 'no';
},
onoff => sub {
$_[0] ? 'on' : 'off';
},
},
},
);
1;
Peter Sørensen schrieb:
Hi,
I am Using catalyst, TT and formbuilder.
I am struggling with output in a textarea field and would like to
"install" a new filter to TT to be used like:
<td><textarea ........>
[% FOREACH line IN subscribers %]
[% line | undent %]
[% END %]
</textarea></td>
I have tried the standard trim filter but this does not give the expected
result.
I found a post facing the problem, where Andy Wardley suggested a undent filter
and supplied code for this.
My problem is where to put this code so that TT will recognize this filter
according to Catalyst.
Do I need to install this as a new Plugin in TT?
Regards
Peter Sorensen/University of Southern Denmark/E-mail: [EMAIL PROTECTED]
Med venlig hilsen
Peter Sørensen
Vid.medarb., IT-service
Tlf. 6550 2858
Fax 6550 2860
Email [EMAIL PROTECTED]
Web http://intern.sdu.dk/it-service/ansatte/ps-238/
Adr. Campusvej 55, 5230 Odense M
SYDDANSK UNIVERSITET
_______________________________________________________________
Campusvej 55 * 5230 * Odense M * Tlf. 6550 1000 * www.sdu.dk
-----Oprindelig meddelelse-----
Fra: Gavin Henry [mailto:[EMAIL PROTECTED]
Sendt: 4. februar 2008 11:50
Til: [email protected]
Emne: [Catalyst] Catalyst and Web Services?
Hi All,
If you want to provide access over SSL with auth, i.e. for example a desktop
app posting and retrieving info from/to a Catalyst app what's the best way?
REST or SOAP?
I want the same users that normalling login via a web browser and get a cookie to be able
to login via a "light" wee desktop app or some such?
Would you create a new interface/access point on the Cat site and use REST or
SOAP?
All new to me, so excuse the dumb questions.
Thanks.
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/
--
Mit freundlichen Grüßen
Felix Antonius Wilhelm Ostmann
--------------------------------------------------
Websuche Search Technology GmbH & Co. KG
Martinistraße 3 - D-49080 Osnabrück - Germany
Tel.: +49 541 40666-0 - Fax: +49 541 40666-22
Email: [EMAIL PROTECTED] - Website: www.websuche.de
--------------------------------------------------
AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310
Komplementärin: Websuche Search Technology
Verwaltungs GmbH - AG Osnabrück - HRB 200359
Geschäftsführer: Diplom Kaufmann Martin Steinkamp
--------------------------------------------------
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/