Re: [Templates] problem with array and FOEARCH

2010-08-18 Thread C. Chad Wallace
-toolkit.org/mailman/listinfo/templates ___ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates -- C. Chad Wallace, B.Sc. The Lodging Company http://www.lodgingcompany.com

Re: [Templates] bad file descriptor

2010-05-31 Thread C. Chad Wallace
() ); -- C. Chad Wallace, B.Sc. The Lodging Company http://www.lodgingcompany.com/ OpenPGP Public Key ID: 0x262208A0 signature.asc Description: PGP signature ___ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org

Re: [Templates] passing tt2 variable in cgi script

2010-03-22 Thread C. Chad Wallace
At 11:19 AM on 20 Mar 2010, dark0s wrote: Can I capture (to pass) the success tt2 variable in login.cgi perl script? Everything sent to your CGI has to be done in hidden inputs. So put a hidden input in your form: input type=hidden name=success value=[% success %] / -- C. Chad Wallace

Re: [Templates] problem with USE DBI

2010-03-22 Thread C. Chad Wallace
use the dollar sign here. In TT, dollar signs are used for dereferencing. query is not a reference, so you don't get anything. -- C. Chad Wallace, B.Sc. The Lodging Company http://www.lodgingcompany.com/ OpenPGP Public Key ID: 0x262208A0 signature.asc Description: PGP signature

Re: [Templates] Accessing/sorting hashes of hashes

2010-03-09 Thread C. Chad Wallace
that 'items.sort' should sort based on the items keys, but it doesn't. For that, you would use 'items.keys.sort'. 'items.sort' sorts the keys based on their corresponding values in the hash (all of which, in this case, are hash references and are probably not useful for sorting). -- C. Chad Wallace

Re: [Templates] .replace(ing) ?

2010-02-16 Thread C. Chad Wallace
]$ ---cut--- -- C. Chad Wallace, B.Sc. The Lodging Company http://www.lodgingcompany.com/ OpenPGP Public Key ID: 0x262208A0 signature.asc Description: PGP signature ___ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org

Re: [Templates] Getting the request object in a Template Toolkit template

2009-12-21 Thread C. Chad Wallace
At 10:36 AM on 20 Dec 2009, Andrew Black wrote: On 15 Dec 2009 18:39, C. Chad Wallace cwall...@lodgingcompany.com wrote: RAWPERL is a Bad Idea, and you need to Find Another Way. Chad - can you explain why RAWPERL should never be used (if I understanding you correctly ) It goes against

Re: [Templates] Getting the request object in a Template Toolkit template

2009-12-15 Thread C. Chad Wallace
: [% request.param('param1') %] Ronald -- C. Chad Wallace, B.Sc. The Lodging Company http://www.lodgingcompany.com/ OpenPGP Public Key ID: 0x262208A0 signature.asc Description: PGP signature ___ templates mailing list templates@template-toolkit.org http

Re: [Templates] Evaluate a TT variable that contain a TT string

2009-11-27 Thread C. Chad Wallace
At 8:13 PM on 27 Nov 2009, Octavian Râsnita wrote: From: C. Chad Wallace cwall...@lodgingcompany.com At 8:45 AM on 26 Nov 2009, Randal L. Schwartz wrote: Octavian == Octavian Râsnita orasn...@gmail.com writes: Octavian but if I put just simple html code in the database

Re: [Templates] TT2Params problems with Apache::Template and mod_perl 2?

2009-11-17 Thread C. Chad Wallace
. So, you need a value for the 'env' param. -- C. Chad Wallace, B.Sc. The Lodging Company http://www.skihills.com/ OpenPGP Public Key ID: 0x262208A0 signature.asc Description: PGP signature ___ templates mailing list templates@template-toolkit.org

Re: [Templates] perl warnings in apache logs

2009-10-21 Thread C. Chad Wallace
. ___ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates -- C. Chad Wallace, B.Sc. The Lodging Company http://www.skihills.com/ OpenPGP Public Key ID: 0x262208A0 signature.asc Description

Re: [Templates] Access a macro in all templates?

2009-10-12 Thread C. Chad Wallace
error - SCALAR(0x8943798): not found. -- C. Chad Wallace, B.Sc. The Lodging Company http://www.skihills.com/ OpenPGP Public Key ID: 0x262208A0 signature.asc Description: PGP signature ___ templates mailing list templates@template-toolkit.org http

Re: [Templates] Bug? Feature? filter not applied when SET is present

2009-03-20 Thread C. Chad Wallace
]$ tpage [% cap = 'capitalised' | upper %] [% cap %] CAPITALISED cwall...@ws80:~[09:20]$ perl -MTemplate -e 'print $Template::VERSION, \n' 2.19 I'm surprised I've never noticed that before... -- C. Chad Wallace, B.Sc. The Lodging Company http://www.skihills.com/ OpenPGP Public Key ID: 0x262208A0

Re: [Templates] Net::IP

2009-02-10 Thread C. Chad Wallace
) %] ^ Get rid of the dollar sign. (This should return a Net::IP object with 1.2.10.130/29) I don't seem to be getting an error, or any kind of output. connector2 = [% c2_net.prefix %] returns connector2 = -- C. Chad Wallace, B.Sc. The Lodging Company http

Re: [Templates] The compiling option for templates

2008-09-12 Thread C. Chad Wallace
, and the template cache directory is no longer accessible to the websites. I've implemented a work-around in my boot scripts, but I didn't realize until just now that I could just place my cache directory somewhere else. :-) -- C. Chad Wallace, B.Sc. The Lodging Company http://www.skihills.com/ OpenPGP

Re: [Templates] The compiling option for templates

2008-09-12 Thread C. Chad Wallace
haven't tried it. If CACHE_SIZE also applies to the COMPILE_DIR caching, it wouldn't be a good idea to set it to zero, because COMPILE_DIR is useful for everyone. -- C. Chad Wallace, B.Sc. The Lodging Company http://www.skihills.com/ OpenPGP Public Key ID: 0x262208A0 Debian Hint #16

Re: [Templates] Comments create newline characters

2008-07-30 Thread C. Chad Wallace
that doing it on both ends results in too much chomping, so I usually just put them at the beginning. See the 'Chomping Whitespace' section in perldoc Template::Manual::Syntax. -- C. Chad Wallace, B.Sc. The Lodging Company http://www.skihills.com/ OpenPGP Public Key ID: 0x262208A0 Debian Hint #20

Re: [Templates] comparisons

2008-05-21 Thread C. Chad Wallace
%] [% END %] [EMAIL PROTECTED]:~[18:59]$ cat tpage-output liHome/li li class=list-currentWho it's for amp; why?/li [EMAIL PROTECTED]:~[18:59]$ --- What are you expecting for output? And what do you get instead? Does mine look like it's working to you? TTYL. -- C. Chad Wallace, B.Sc

Re: [Templates] only getting one error in a loop

2008-05-15 Thread C. Chad Wallace
At 10:39 AM on 15 May 2008, Robert Hicks wrote: C. Chad Wallace wrote: At 7:05 PM on 14 May 2008, Robert Hicks wrote: Because I am building 2 types of emails...I have 2 $template-process commands and because it is in a loop and I have 5 users, I get five error message when a template

Re: [Templates] only getting one error in a loop

2008-05-14 Thread C. Chad Wallace
the unique ones to STDERR. I am not sure if that is enough to go on. How about: instead of calling die, you save the error info in a hash, and then at the end of the loop, warn the unique ones. -- C. Chad Wallace, B.Sc. The Lodging Company http://www.skihills.com/ OpenPGP Public Key ID

Re: [Templates] Search the list archive ?

2008-01-30 Thread C. Chad Wallace
database - -- C. Chad Wallace, B.Sc. The Lodging Company http://www.skihills.com/ OpenPGP Public Key ID: 0x262208A0 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHoN4nKeSNHCYiCKARApPyAJ9WnAkiarDtAteJg016Ur

Re: [Templates] formatting a Number with comma seperating 1000's

2007-06-14 Thread C. Chad Wallace
://search.cpan.org/dist/Template-Plugin-Number-Format/Format.pm For example: (untested, since I don't have the plugin installed) [% USE Number.Format( THOUSANDS_SEP = ',' ) %] [% 1000 | format_number %] [% 100 | format_number %] - -- C. Chad Wallace, B.Sc. The Lodging Company http://www.skihills.com

Re: [Templates] bug in Template/Base.pm

2007-05-21 Thread C. Chad Wallace
$hash = { map { ($_ = shift @args) } @$argnames, _ERROR = '', DEBUG = 0, }; warn Dumper($hash); /cut with and without braces around map. SM SM SM -- SM Sergey Martynoff SM - -- C. Chad Wallace, B.Sc

Re: [Templates] ttree and .files

2006-10-02 Thread C. Chad Wallace
. Chad Wallace, B.Sc. The Lodging Company http://skihills.com/ OpenPGP Public Key ID: 0x262208A0 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFIV5AKeSNHCYiCKARAhjYAKC96Y5NDJqLJltkGIT1ONDcP+Nw5ACgt+Lx yiEc001A

Re: [Templates] Template::Plugin::DBI - Using an existing db handle

2006-06-27 Thread C. Chad Wallace
called Table. I certainly wouldn't like that if I were an SQL database. :-) HTH. - -- C. Chad Wallace, B.Sc. The Lodging Company http://skihills.com/ OpenPGP Public Key ID: 0x262208A0 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http

Re: [Templates] redirect the fatal error to browser

2006-05-25 Thread C. Chad Wallace
; } In my defense, I must say that I've been using this piece of code, unmodified, for over a year in every TT script that I've written so far--so you can understand how I took it for granted. Sorry for the misinformation! - -- C. Chad Wallace, B.Sc. The Lodging Company http://skihills.com/ OpenPGP

Re: [Templates] redirect the fatal error to browser

2006-05-25 Thread C. Chad Wallace
. -- C. Chad Wallace, B.Sc. The Lodging Company http://skihills.com/ OpenPGP Public Key ID: 0x262208A0 ___ templates mailing list templates@template-toolkit.org http://lists.template-toolkit.org/mailman/listinfo/templates

Re: AW: [Templates] Problem accessing hash-ref-data in a filter (hash ref gets stringified)

2005-08-04 Thread C. Chad Wallace
C. Chad Wallace Gesendet: Mittwoch, 3. August 2005 22:13 An: templates@template-toolkit.org Betreff: Re: [Templates] Problem accessing hash-ref-data in a filter (hash ref gets stringified) [EMAIL PROTECTED] wrote: I try to process data from a hash ref in a filter, but it seems

[Templates] Patch to implement USE_SINGLETON idea in CAP::TT

2005-01-27 Thread C. Chad Wallace
, you haven't already implemented it yourself. :-) I've tested this a bit, and it works--at least, it reuses the Template object. Please let me know what you think... Thanks, Chad. -- C. Chad Wallace The Lodging Company http://skihills.com/ OpenPGP Public Key ID: 0x262208A0 --- lib/CGI/Application

Re: [Templates] TT in callback

2005-01-07 Thread C. Chad Wallace
Andy Wardley wrote: Rather than copying the entire variable stash each time we need to create a localised variable scope (e.g. INCLUDE), TT3 creates a new, empty variable stash with a parent link pointing upwards to the stash of the calling context. When a variable is first accessed, the

Re: [Templates] hash.keys not working on blessed hash?

2004-12-15 Thread C. Chad Wallace
Simon Wistow wrote: [...] package UNIVERSAL; sub keys { my $self = shift; return unless ref $self; return unless ref $self $self-isa( 'HASH' ); ...otherwise, the next line is going to die on any object reference that isn't a hash. return keys %{$self}; }

Re: [Templates] Template Toolkit and DateTime::Duration

2004-12-07 Thread C. Chad Wallace
Arshavir Grigorian wrote: DateTime::Duration obviously does not overload comparison operators, but where am I comparing anything ? Calling the years() method in the Perl code outside the template works fine. Another problem is that the line numbers are incorrect (8 lines off). Line 28 in my

Re: [Templates] ttree directory processing order.

2004-12-02 Thread C. Chad Wallace
Matthias Schroeder wrote: So you can't be sure about the sequence unless you specify files on commandline, but anyway i think ist a bad idea to share global vars between files, why not use small include-file per directory where you are setting that var (or something which helps you to decide