Re: [Templates] url parsing

2001-06-26 Thread Simon Wilcox
Viljo Marrandi wrote: > > Hello, > > Don't know if this is the right place to ask this question, but i'm > going to use TT so anyway... Does anyone know any good way to parse url > in such way that everything that comes after address are used as > parametres eg. > > http://www.tester.com/pictur

Re: [Templates] loop question

2001-10-31 Thread Simon Wilcox
On Wed, 31 Oct 2001, Viljo Marrandi wrote: > Hello, > > I know there must be a simple solution for this problem, but i didn't > find it in docs. Look in Template::Manual::Directives under FOREACH > How can i print out inside FOREACH loop (or WHILE or WHATEVER) how many > loops it has already do

Re: [Templates] TTree

2002-01-24 Thread Simon Wilcox
On Wed, 23 Jan 2002, Bill Moseley wrote: > > I use "wrapper" to create my pages which is basically: > >[%- WRAPPER page; PROCESS $template; END -%] Hi Bill, Please excuse the probably dumb questions but do you put this at the top of each of you template pages ? And am I correct in assuming

[Templates] ttree - determining source

2002-02-11 Thread Simon Wilcox
Hi all, Is there any way to determine the source directory from within a template during processing ? I reference a number of external files for which I have to supply full paths. At present I define a SRC variable in my config.tt global template which works but I wondered if there was a more e

Re: [Templates] TTree

2002-01-24 Thread Simon Wilcox
On Thu, 24 Jan 2002, Andy Wardley wrote: > On Thu, Jan 24, 2002 at 01:04:36PM +0000, Simon Wilcox wrote: > > And am I correct in assuming that it is a concise form of this ? > > > > [%- WRAPPER page %] > > > > ..template stuff.. > > > > [% END -%

Plugins for functional interfaces - was (Re: [Templates] When to write a Plugin?)

2002-02-11 Thread Simon Wilcox
On Wed, 6 Feb 2002, Lyle Brooks wrote: > I wonder how many Plugin solutions could be more effectively written > with one of these "non-Plugin" alternatives? Yesterday I think I found a reason to write a plugin. I wanted to access a module that had only a functional interface. I couldn't just pas

[Templates] Problems with META

2002-02-18 Thread Simon Wilcox
Hi, I am processing templates with ttree and in one place I generate an index page from a data file and for each item in the index I want to generate an additional detail page from a secondary template. Both the index page and the secondary page are wrapped in a master template. I'm doing somethi

Re: [Templates] Newbie Needs Help :-)

2002-04-24 Thread Simon Wilcox
On Wed, 24 Apr 2002 [EMAIL PROTECTED] wrote: > I'm a newbie and need some help :-). Welcome :-) > It goes HEADING|DATE|NEWS, so, I want to use Template Toolkit to pass > this data to my template file. Here is what I have so far, but, I > can't figure out how to separate the data by the |'s

Re: [Templates] trueness of arrrays/hashes

2002-01-24 Thread Simon Wilcox
On Fri, 25 Jan 2002, Stas Bekman wrote: > I was wondering why it's always a quiz to figure out whether a value is > empty or not. > [snip example] > so in case of array I must always remember to use: > > IF var.array.size; > > and in case of hash, I don't even remember what was the trick, I t

[Templates] Datafile.pm patch

2002-02-15 Thread Simon Wilcox
Not sure if this is bug as such but I've found that Datafile.pm on linux wasn't removing the \r from the end of ascii files created on a Windows PC resulting in unexpected behaviour. Here's a patch (created as per Template::Manual::Internals although it seems a bit of overkill for 2 lines :)

Re: [Templates] Exceedingly strange problem

2002-09-24 Thread Simon Wilcox
On Fri, 20 Sep 2002, Hann, Brian wrote: > For some reason, in the template I am trying to display, sometimes I get > nothing, no header or text so I get the 500 error and the "premature end > of script headers" line in my error log. I've seen this when the template processing fails and I haven't

Re: [Templates] template-toolkit and GD

2002-10-25 Thread Simon Wilcox
On Fri, 2002-10-25 at 19:19, Randal L. Schwartz wrote: > > "Pablo" == Pablo Velasquez <[EMAIL PROTECTED]> writes: > > Pablo> Thanks for the reply. Yes, I've found that if I want an image I > Pablo> need the content-type to be image. And it does work, but my > Pablo> main problem is that I want

[Templates] 2.08 build failure on Redhat 8.0

2002-10-30 Thread Simon Wilcox
n't have Apache::Util installed on this system so it must be using HTML::Entities. I don't think either of these are fatal so I will just force an install but it probably needs fixing. Details of the installed perl follow. Rgds, Simon Wilcox. Summary of my perl5 (revision 5

Re: [Templates] 2.08 build failure on Redhat 8.0

2002-10-30 Thread Simon Wilcox
On Wed, 2002-10-30 at 17:45, Mark Fowler wrote: > On 30 Oct 2002, Simon Wilcox wrote: > > > Template Toolkit 2.08 fails to build on my new Redhat 8.0 box with perl > > 5.8.0 > > Funny, it built fine on my new Debian Sid box with perl 5.8.0. ;-) [% INCLUDE std.fla

[Templates] Modifying TT functions at run time

2002-11-04 Thread Simon Wilcox
All, I am using ttree to generate html files, so all my extension perl glue has to go into either plugins or [% PERL %] blocks. I've successfully added a scalar op using $Template::Stash::SCALAR_OPS but now I want to use a module from the CPAN and expose one of its functions to my templates like

Re: [Templates] Modifying TT functions at run time

2002-11-04 Thread Simon Wilcox
On Mon, 2002-11-04 at 15:16, Mark Fowler wrote: > On 4 Nov 2002, Simon Wilcox wrote: > > > Is it possible to add a function like this at runtime or should I just > > bite the bullet and write a plugin ? > > There is no bullet to bite when writing plugins. Stop pretendin

Re: [Templates] Modifying TT functions at run time

2002-11-04 Thread Simon Wilcox
On Mon, 2002-11-04 at 15:01, darren chamberlain wrote: > * Simon Wilcox <[EMAIL PROTECTED]> [2002-11-04 09:38]: > > Is it possible to add a function like this at runtime or should I just > > bite the bullet and write a plugin ? > > Nothing springs to mind that would he

[Templates] Testing plugins

2002-11-05 Thread Simon Wilcox
Following on from the discussion about image plugins and so on I've decided that I want to implement my munging as a filter, so that I can seemlessly fix-up all the image tags on the site without having to break html syntax in the templates and pages. So I've used the Template::Plugin::Filter modu

Re: [Templates] filtering includes

2002-11-05 Thread Simon Wilcox
On Tue, 2002-11-05 at 12:10, Rafiq Ismail (ADMIN) wrote: > Hi Templatinos, > > I'm looking for an easy way to solve a problem, which I'm currently > facing. We have a HUGE bunch of default html_header, footer, etc files > which tie into our legacy non-template system. They are all raw html with

Re: [Templates] Problem in installing

2002-11-06 Thread Simon Wilcox
Hi, On Wed, 6 Nov 2002, Srinivas_Kotamraju wrote: > I am trying to install Template-Toolkit ver 2.08, when I tried perl > Makefile.pl I am getting this error message, Can anyone help me. > > root@linux:/usr/share/Template-Toolkit-2.08 > perl Makefile.PL > Can't locate File/Temp.pm in @INC (@INC

Re: [Templates] perl Makefile.PL gives an error

2002-11-07 Thread Simon Wilcox
On Thu, 2002-11-07 at 11:42, Edwin Raj wrote: > Hello, > > I have downloaded the template Toolkit ver 2.08 from the CPAN site. > Untarred it and changed to the Template Toolkit directory and when > issuing the command "perl Makefile.PL" it gives an error > > Can't locate File/Temp.pm in @INC (@IN

Re: [Templates] Template Tookit Vs HTML::Template

2002-11-15 Thread Simon Wilcox
On Fri, 2002-11-15 at 13:05, Rafiq Ismail (ADMIN) wrote: > I have to provide sound arguments as to why our prospective new system > shouldn't move away from TT2 and use HTML::Template instead. On many levels of course there isn't much to choose between them. You already have TT2 in use so there

[Templates] Replacing ttree with make

2002-11-15 Thread Simon Wilcox
I'm finding that ttree has some limitations, particularly in the single config file when running multiple sites. I'm sure I've read of people using make to control their builds but I can't see anything in the archive. Having read the o'reilly make book, I'm at a bit of a loss how to get started w

[Templates] ttree patch

2002-11-15 Thread Simon Wilcox
When I'm working on a site with cascaded templates (i.e. using INCLUDE or PROCESS) I often find I have to run ttree with the --all switch whenever I change a sub-template to remake the templates it's included in. This is OK except that it always copies over all the images and other ancillary stuff

Re: [Templates] Replacing ttree with make

2002-11-15 Thread Simon Wilcox
On Fri, 2002-11-15 at 13:45, Andy Wardley wrote: > Simon Wilcox wrote: > > I'm finding that ttree has some limitations, particularly in the single > > config file when running multiple sites. > > You know you can create multiple config files? I didn't know that. I

Re: [Templates] Order of evaluation

2002-11-21 Thread Simon Wilcox
On Thu, 2002-11-21 at 12:15, Andrew Beattie wrote: > Does that make sense? kinda :) > So the question was: can I tell TT to evaluate all it's variables before it does > anything, or do I need to explicitly reference them to get them to evaluate? I'm wondering why you want to delay the populat

Re: [Templates] Problem with templates not processing and perldumping core

2002-11-29 Thread Simon Wilcox
On Fri, 2002-11-29 at 16:34, Hann, Brian wrote: > I'm having ANOTHER problem with templates not being processed and perl dumping core. > I get no output and no errors but if I remove certain blocks of lines from the file >the template will display. There's no special TT directives or anything in

Re: [Templates] BLOCKS directive points to method of an object ?

2002-12-09 Thread Simon Wilcox
On Mon, 2002-12-09 at 17:59, Gernot Homma wrote: > > i just took a look at the docs but i didn't get the clue. well, i know how > to do something with the context and the stasth, but i just don't know how > to specify the block, so when this block is called out from a template i > have a reference

Re: [Templates] Carp error

2003-01-02 Thread Simon Wilcox
On Thu, 2 Jan 2003, Tim Dolezal wrote: > I am trying to get my first template up and I keep getting a > "Template::Exception at C:/Perl/lib/CGI/Carp.pm line 301." error. [snip] > ibo.SpouseType %] [% ibo.CreateDate %] [% ibo.ModifyDate %] [% > ibo.ModifiedBy ^ Missing a %] ?

Re: [Templates] Passing Blessed Hash

2003-06-06 Thread Simon Wilcox
On Fri, 6 Jun 2003, Tom Insam wrote: > Ok, so I'd like to do something like > > > #!/usr/bin/perl > my $thing = Stuff->new(); > $tt->process("template.tem", $thing); > > package Stuff; > > sub new { > return bless {}, shift; > } > > sub colour { > my ($self) = @_; > return "ora

Re: [Templates] A Question?

2003-05-30 Thread Simon Wilcox
On Wed, 2003-05-28 at 08:55, Saradhi N.C wrote: > Hello All, > > I have a slight problem using the Template.pm module. > > In my template I have used in several places > [%NEXT%] Is this meant as a literal or do you have a variable called NEXT ? If you need a literal, you could try encoding the

Re: [Templates] Leaking 'component'?

2003-06-03 Thread Simon Wilcox
On Tue, 3 Jun 2003, Paul Makepeace wrote: > Hello - > > My attempt to pass in a template parameter named "component" is stymied > by some behind-the-scenes clobbering. I don't know my way around the > Template sources but the line in Template::Context, [snip] > Is this intentional, documented?

Re: [Templates] installation problem - filter.t

2003-06-12 Thread Simon Wilcox
On Thu, 2003-06-12 at 14:30, Dave Howorth wrote: > > Is there any way to change this behaviour so the tests run clean? > You might try the latest developer release [1] I think that fixed quite a few test issues. Simon. [1] http://www.template-toolkit.org/download/Template-Toolkit-2.09c.tar.gz

Re: [Templates] Template Toolkit verion 2.10

2003-07-25 Thread Simon Wilcox
On Thu, 24 Jul 2003, Andy Wardley wrote: > Version 2.10 of the Template Toolkit is now available. I'm getting a build failure on 2.10, in t/autoform.t : MATCH FAILED input: [[% USE autoformat %] [% FILTER poetry = autoformat(left => 20, right => 40) %] Be not afeard. The isle is full of no

Re: [Templates] Template Toolkit verion 2.10

2003-07-25 Thread Simon Wilcox
On Fri, 25 Jul 2003, Andy Wardley wrote: > Simon Wilcox wrote: > > I'm getting a build failure on 2.10, in t/autoform.t : > > Don't sweat it. Autoformat seems to be very variable about the output > it generates. I disabled the tests for Perl 5.8.0 because t

Re: [Templates] How to redirect template output into another file?

2003-09-16 Thread Simon Wilcox
On Tue, 16 Sep 2003, Andy Wardley wrote: > [% FOREACH product IN products; # loop through each product >page = "${product.id}.html"; # construct product page URL >PROCESS product/page # generate product page... >FILTER redirect(page);

Re: [Templates] (no subject)

2003-09-19 Thread Simon Wilcox
On Fri, 19 Sep 2003, Mace, Richard wrote: > Hi, > I have a hash in my CGI script, e.g. $info{$filename} = $filepath; > (hash contents e.g. > KEY: one.html, VALUE: /REPORTS > KEY: two.html, VALUE: /REPORTS > KEY: three.html, VALUE: /REPORTS > KEY: four.html, VALUE: /REPORTS ). > > I'm pass

Re: [Templates] (no subject)

2003-09-19 Thread Simon Wilcox
On Fri, 19 Sep 2003, Clayton L. Scott wrote: > On Fri, 19 Sep 2003, Simon Wilcox wrote: > > > You might try the 'sort' vmethod. From Template::Manual::VMethods : > > But in that case three would come before two. D'oh ! Stupid me. Yes, arrays are definitely

Re: [Templates] tt book

2003-09-30 Thread Simon Wilcox
On Tue, 30 Sep 2003 [EMAIL PROTECTED] wrote: > When is the TT book coming out? Amazon seems to be expecting the "Badger book" on 30th Nov : http://www.amazon.co.uk/exec/obidos/ASIN/0596004761/ Just in time for Christmas folks, the perfect gift for all the family ! I can't wait to read the col

Re: [Templates] How to redirect template output into another file?

2003-10-05 Thread Simon Wilcox
On Tue, 16 Sep 2003, Andy Wardley wrote: > You can always add it manually. Something like this: > > FILTER redirect(page); > PROCESS product/page WRAPPER site/wrapper; > END Finally had a need to actually use this and I seem to be doing something dumb ! Here's a snippet from my code:

Re: [Templates] How to redirect template output into another file?

2003-10-06 Thread Simon Wilcox
On Mon, 6 Oct 2003, Andy Wardley wrote: > Simon Wilcox wrote: > > my $tt = Template->new( > > INCLUDE_PATH => 'util', > > PROCESS => 'wrapper.tt', > > Use the WRAPPER option: >

[Templates] Of segfaults, lists and hashes

2003-10-09 Thread Simon Wilcox
This causes a segfault on my 5.6.1 tt v 2.10 setup: [% PERL %] $foo = 'hello'; [% END %] Whereas this does not: [% PERL %] my $foo = 'hello'; [% END %] This segfaults: [% PERL %] my $sub = sub { ( ref( $_[0] ) eq $_[1] ) }; $Template::Stash::LIST_OPS->{ is_a } = $sub; $Template::Stash::HASH

Re: [Templates] Hi, and newbie question...

2003-10-15 Thread Simon Wilcox
On Wed, 15 Oct 2003, Dave Cross wrote: > Ken Corey said: > > Hi All, > > > > Is there an archive of the mailing list somewhere like escribe or > > something? > > See . Or for the less mascochistic, you can find a searchable archive at: http://www.mail-archiv

Re: [Templates] Bricolage

2003-10-16 Thread Simon Wilcox
On Thu, 16 Oct 2003 [EMAIL PROTECTED] wrote: > What is the status of TT with Bricolage. Is anyone here using it? I believe Arthur Bergman committed the TT burner to the bricolage CVS tree but I don't think it's been released yet. > (Ok ok so maybe this would be best asked on the Bricolage mail

Administrivia (was Re: [Templates] html filter qn)

2003-11-11 Thread Simon Wilcox
On 11 Nov 2003, Randal L. Schwartz wrote: > You have exceeded the 4-line .sig boilerplate limit with a worthless > unenforcable disclaimer. Please remove this text from future postings > to this mailing list. If you cannot do so for mail from your domain, > please get a freemail account and rejo

Re: [Templates] about the book

2003-12-04 Thread Simon Wilcox
On Thu, 4 Dec 2003, Jesse Sheidlower wrote: > Sounds great! So when in December can we get our grubby hands on > copies? Sadly we have to wait until sometime in the new year according to a recent post from someone in the know at O'Reilly :-( http://london.pm.org/pipermail/london.pm/Week-of-Mon-

[Templates] CPAN, Plugins and namespaces

2003-12-16 Thread Simon Wilcox
Hello, I've written a Plugin which provides an easy means to work with a sitemap described by an xml file. It parses the xml and provides methods for the template author to quickly find all the submenu items of a particular uri and the breadcrumb trail leading to a uri. It seems useful to me

Re: [Templates] CPAN, Plugins and namespaces

2003-12-17 Thread Simon Wilcox
On Wed, 17 Dec 2003, Andy Wardley wrote: > Simon Wilcox wrote: > > I've written a Plugin which provides an easy means to work with a sitemap > > described by an xml file. > > Me too. Several times, each time slightly different :-) :-) > Can you post the code an

[Templates] ttree failure mode

2004-01-19 Thread Simon Wilcox
I just found a weird failure mode in ttree. Say I have a destination of /staging/www.foo.com and I have subdirectories cgi-bin and html. When ttree runs, directories are made as required. Except when www.foo.com does not exist. In this case, www.foo.com is made but the first sub directory is no

Re: [Templates] ttree failure mode

2004-01-19 Thread Simon Wilcox
On 19 Jan 2004, Randal L. Schwartz wrote: > >>>>> "Simon" == Simon Wilcox <[EMAIL PROTECTED]> writes: > > Simon> -mkdir $target, $mode || do { > Simon> -warn "mkdir ($target): $!\n"; > Sim

Re: [Templates] TT Advocacy

2004-01-27 Thread Simon Wilcox
On Tue, 27 Jan 2004, Dave Cross wrote: > Does anyone thing that a list of sites using TT would be a useful > addition to the TT web site? Yes. > And, if so, shall I start to collate information? peace direct - http://www.peacedirect.org/ Digital Craftsmen - http://www.digitalcraftsmen.net/ Dyn

Re: [Templates] TT Content manager

2004-01-28 Thread Simon Wilcox
On Wed, 28 Jan 2004, David Hodgkinson wrote: > I believe one of the big OSS ones is getting TT support - Simon Wilcox > may know more... Yup. Bricolage [1] has TT templating on the output side in the current 1.7.x branch. Expect a stable 1.8.0 release in the not too distant future. Bri

RE: [Templates] buffering output

2004-02-24 Thread Simon Wilcox
On Wed, 25 Feb 2004, henk wrote: > If your data is tabular of nature, you may consider a trick using > javascript. > We use it with succes: just populate a set of JS data arrays with the raw > data and let a JS function expand them to html. This way, we trimmed 50% of > the amount of html source t

Re: [Templates] template variable question

2004-03-02 Thread Simon Wilcox
Hi Chris, On Tue, 2 Mar 2004, Chris Ochs wrote: > Duh, I should have known that, been looking at this code to long. > > Is there that much overhead in calling the new method on say 10 different > modules before processing the template, if the new methods are all just like > this? Very little c

Re: [Templates] inline chomping not working

2004-03-10 Thread Simon Wilcox
On Tue, 9 Mar 2004, Jason Gottshall wrote: > I also have readability issues I'm trying to address. The bottom line is > that I'm not getting the expected chomping behavior from the minuses. Is it possibly something to do with interpretation of line endings ? Were the templates writing on the sa

Re: [Templates] screenplay formatting

2004-03-15 Thread Simon Wilcox
On Mon, 15 Mar 2004, Cahill, Earl wrote: [snip xml->html samples] > Something I currently can't handle, but would like to is pagination. Like > when a character is speaking and their dialogue carries over, there are > rules to show the continuation is going to occur, and that it did occur. > One

RE: [Templates] screenplay formatting

2004-03-15 Thread Simon Wilcox
On Mon, 15 Mar 2004, Thomas, Mark - BLS CTR wrote: > > HTML doesn't really have the concept of pagination, so if > > you're really generating html, you needn't worry about it :-) > > Sure it does, thanks to CSS2. Sample code: Ah yes. I don't use that because it's not (or at least wasn't) widely

Re: [Templates] WHILE bug-o-feature

2004-04-12 Thread Simon Wilcox
On Mon, 12 Apr 2004, Aleksandr Guidrevitch wrote: > Thanks Dave for a good try, but I have my > own iterator (similar to Class::DBI::Iterator), > which returns next value only by calling iterator.next, > so it wouldn't work. Well if it's your own iterator, why not add a C method so that you can

[Templates] Apache::Template & plugin path problems

2004-05-12 Thread Simon Wilcox
My file structure looks like this: /var/www/site/html (html docs) /var/www/site/lib (TT templates) /var/www/site/data (xml files) In my template I have [% USE XML::Simple( 'data/menu.xml' ) %] This works fine in ttree when run from /var/www/site but blows up when using Apache::Template (whic

Re: [Templates] Apache::Template & plugin path problems

2004-05-12 Thread Simon Wilcox
On Wed, 12 May 2004, darren chamberlain wrote: > What do the permissions on /var/www/site/data look like? drwxrwsr-x3 simonw staff4096 May 12 17:41 data Looks ok to me. I forgot to mention, it works if I put in an absolute path. Sorry for the partial story. Simon. -- "I'm not h

Re: [Templates] Apache::Template & plugin path problems

2004-05-14 Thread Simon Wilcox
On Thu, 13 May 2004, Kenny Gatdula wrote: > Try setting the SearchPath for XML::Simple. [% USE xml = XML::Simple( > 'menu.xml' , {SearchPath => ['/var/www/site/data/'] }) %] Cool. Amazing what you learn. But I don't like having to specify the paths in my files, they're different on dev and prod

Re: [Templates] Apache::Template & plugin path problems

2004-05-14 Thread Simon Wilcox
On Fri, 14 May 2004, Andy Wardley wrote: > You could do this instead: > >$input = $context->insert($input) unless $input =~ / > The $context->insert($filename) does the job of finding the file > in the INCLUDE_PATH and returning the content. Darn you and super-flexible templating system. H

Re: [Templates] Creating Wiki-style Free links?

2004-09-01 Thread Simon Wilcox
On Wed, 1 Sep 2004, Jesse Sheidlower wrote: > I was originally going to write it as a filter, but realized that I > need to access some TT variables, which determine the path and action, > and it would be clunky to pass every possible variable into the filter. > But I'm not sure how to write it as

Re: [Templates] Update to Template/Plugin/XML/Simple.pm

2004-09-22 Thread Simon Wilcox
Whilst patching XML::Simple, please could you include the trick to obey the IncludePath directive, namely: > NEW 'new' > sub new { > my $class = shift; > my $context = shift; > my $input = shift; > my $args= ref $_[-1] eq 'HASH' ? pop(@_) : { }; > > if (defined($i

Re: [Templates] TT Without Perl

2004-10-01 Thread Simon Wilcox
On Fri, 1 Oct 2004, Dave Cross wrote: > Following a discussion on my use.perl journal[1], I'd be really > interested in hearing about anyone who is using TT but not Perl - that > is using templates with tpage, ttree or Apache configured with > Apache::Template (or similar) such that useful applica

[Templates] Apache Template TT2ServiceModule

2004-10-20 Thread Simon Wilcox
Hmmm, Apache::Template only allows me to have one service module. I cannot define different TT2ServiceModule's in different vhosts and have them work as I would expect. Attached patch seems to fix that so that Template::Config::SERVICE is set correctly before ->service( $cfg ) is called. It has

Re: [Templates] {Virus?} Incoming message

2004-10-28 Thread Simon Wilcox
On Thu, 28 Oct 2004, Stephen Quinney wrote: > Is there any way to stop these virus reports being sent to the > template toolkit list all the time or do I have to blackhole this > email address? If you think this is "all the time" you should take a turn as moderator and see how much crap you *don'

Re: [Templates] Dennis Daupert/GIS/CSC is out of the office

2004-12-13 Thread Simon Wilcox
On Mon, 13 Dec 2004, Dave Cross wrote: > Can a list admin please set Dennis at nomail until he gets back. Done. I'll re-enable him on the 16th unless he does it himself beforehand. Dennis - you can reenable list delivery here: http://lists.ourshack.com/mailman/options/templates/ddaupert--at--cs

Re: [Templates] tt and SpreadSheet::WriteExcel

2005-01-06 Thread Simon Wilcox
On Thu, 6 Jan 2005, Sean T Allen wrote: > Are there any modules to get tt2 and Spreadsheet::Excel to play nice > together so I can still format using template toolkit but have > Spreadsheet:::Excel to do the final output... How complicated is your spreadsheet ? Did you know that you can create a

Re: AW: [Templates] TT and PHP

2005-02-25 Thread Simon Wilcox
On Fri, 25 Feb 2005, Denis Banovic wrote: > Yes, that's correct, I'm looking for a way to convert (some parts of ) > TT ( eg. [ FOREACH and IF ] ) to PHP. Our PHP templates are very similar > to TT-Templates, How about doing it the other way and processing the PHP in Perl ? http://search.cpan.or

Re: AW: [Templates] TT and PHP + Attachement

2005-02-25 Thread Simon Wilcox
On Fri, 25 Feb 2005, Denis Banovic wrote: > I think that I've put this question on the wrong list. It's true that I > need to convert TT-Templates to PHP, but I must do it IN PHP. Do you ? If I've understood you correctly, you have a template that you wish to use in both TT and PHP applications.

Re: [Templates] CDBI,CGIAPP, and TT

2005-07-21 Thread Simon Wilcox
On Thu, 21 Jul 2005, Will wrote: > Any suggestions? Could you explain to me how to best use these modules > together, or point me to some example already on the web? http://search.cpan.org/~ceeshek/CGI-Application-Plugin-TT-0.06/ Should help you glue TT into CGI::Application. You might also con

Re: [Templates] Class::DBI retrieve_all to TT?

2005-07-22 Thread Simon Wilcox
On Thu, 21 Jul 2005, Will wrote: > I have in my script: > > my @volumes = S::Volumes->retrieve_all; > my $vars = {'volumes' => @volumes}; As Dave pointed out, you need to pass a reference to the array but if yo have a large dataset, it may be more efficient to use the Class::DBI::Iterator # in s

Re: [Templates] test failures

2005-07-27 Thread Simon Wilcox
On Wed, 27 Jul 2005, David Charles Todd wrote: > So, I have tried three different versions of tt2: 2.14, 2.13, 2.08. Each > fails some portion of their tests. I have a hard time believing I am the > first to discover this. Sorry you're having a bad time. TT installed fine on my systems so I guess

Re: [Templates] Cleanly redirect from Apache::Template?

2005-08-22 Thread Simon Wilcox
On Mon, 22 Aug 2005, Luke Meyer wrote: > FWIW, I'm working on yet another framework to do just this: implement > MVC with Template as the V. There are a number of other frameworks > on CPAN that do MVC to some degree, but none that I've seen that work > (in an integrated fashion) with Template.

Re: [Templates] How to load a set of variables with tpage/ttree?

2005-09-01 Thread Simon Wilcox
On Thu, 1 Sep 2005, Trond Michelsen wrote: > So I was wondering what's the best way of making these > variables available for the templates that'll use them. How about writing out a TT template from the perl programme instead of using Data::Dumper. Then you can just PROCESS it in

[Templates] Apache::Template

2005-12-13 Thread Simon Wilcox
A long time ago, in a mailing list far far away, well actually last year and on this very mailing list, I posted a message about problems with Apache::Template and multiple service modules: http://template-toolkit.org/pipermail/templates/2004-October/006733.html I got no response at the time but

Re: [Templates] Class Methods

2006-01-25 Thread Simon Wilcox
On Wed, 25 Jan 2006, Martin Moss wrote: > Can anybody tell me how to call methods on a class, > not on an object from within TT2...? use Template::Plugin::Class; # then in your template do [% USE myclass = Class( 'My::Class') %] [% myclass.some_method %] See http://search.cpan.org/~rclamp/Tem

Re: [Templates] Removing even more whitespace

2006-01-29 Thread Simon Wilcox
On Sun, 29 Jan 2006, Paul Makepeace wrote: > > [% IF 1 %] > > [% END %] > > > the best I can get (with POST_CHOMP and FILTER collapse) is, > > > > That extra space between the td and img can damage the rendering. Isn't that extra space in there explicitly ? Shouldn't you write [% IF 1

Re: [Templates] Controlling the permissions of COMPILE_DIR

2006-02-03 Thread Simon Wilcox
On Fri, 3 Feb 2006, Matthew Adams wrote: > I have a situation where I have two different Apache servers running under > two different users. Are you trying to share templates between these two servers or are they entirely separate ? > My problem is I end up having a directory - say /tmp/ttc - cr

[Templates] New releases

2007-02-08 Thread Simon Wilcox
Just in case anyone missed it, there have been two releases of TT recently which only seem to have been "announced" in someone's use.perl journal. http://use.perl.org/~Alias/journal/32236 [2.16] http://use.perl.org/~Alias/journal/32348 [2.17] These weren't made by Andy, he seems to be busy else

Re: [Templates] Re: New releases

2007-02-08 Thread Simon Wilcox
On Thu, 8 Feb 2007, Robert Hicks wrote: > Are these going up on CPAN? 2.15 is the last I can pull down. http://search.cpan.org/~adamk/Template-Toolkit-2.17/ Suggests that they are. Is your mirror stale ? Simon. -- "Zaphod old mate, I trust you as far as I could comfortably spit out a rat"

Re: [Templates] New releases

2007-02-08 Thread Simon Wilcox
On Thu, 8 Feb 2007, Jess Robinson wrote: > Yes, just chatted to Alias about why he didn't announce to the list, in > fact. Reply: "TT has a mailing list?" .. (hmpf) I saw that in his reply to my journal comment too and thought the same but on looking at the docs it isn't obvious that there is a m

Re: [Templates] Andy Wardley - not necessarily dead yet.

2007-02-08 Thread Simon Wilcox
On Thu, 8 Feb 2007, Bill Moseley wrote: > I also wonder if Adam's versions were from cvs or from the 2.15 > release. > > Does Andy want to put what time he might have into TT3? Maybe TT2 > should be put up someplace where more development can happen -- and > happen as a group so there are not dif

Re: [Templates] New Subversion repository to replace CVS

2007-03-14 Thread Simon Wilcox
On Wed, 14 Mar 2007, Josh Rosenbaum wrote: > Andy, is there a web interface for this like the viewcvs web interface? I expect there will be. In the meantime you could use SVN::Web to set up your own local one as it now supports remote repositories. http://search.cpan.org/~nikc/SVN-Web-0.52/ Sim

Re: [Templates] Problem with single element arrays

2007-08-20 Thread Simon Wilcox
David wrote: [% product.images.first.filename %] Try [% product.images.list.first.filename %] to force the scalar into a list, it's a noop on listrefs. See also Template::Manual::VMethods S. ___ templates mailing list templates@template-toolkit.o

[Templates] [Fwd: Re: CMS using perl and TT]

2008-04-29 Thread Simon Wilcox
I really should know better. Should have sent this to the list too :-) Original Message Subject: Re: [Templates] CMS using perl and TT Date: Tue, 29 Apr 2008 11:36:56 +0100 From: Simon Wilcox <[EMAIL PROTECTED]> To: David Carroll <[EMAIL PROTECTED]> Referenc

Re: [Templates] Performance documentation

2008-09-24 Thread Simon Wilcox
Randal L. Schwartz wrote: >> "Josh" == Josh Rosenbaum <[EMAIL PROTECTED]> writes: > > Josh> Above you mention generating 5k inputs. If you mean HTML inputs, that > Josh> could explain why the client was waiting 40 minutes. Browsers take > Josh> render times too and some have a very hard time r

Re: [Templates] Performance documentation

2008-09-24 Thread Simon Wilcox
Wow, how wrong was I on my last post :-) Chris Travers wrote: [snip description] > The typical workflow is that the user gets a list of vendors not to > pay, locates them, unchecks the box, locates any vendors which should > only receive a partial payment, enters information as to which > invoic

Re: [Templates] Nested tags issue with creating useful SQL queries in simple Template.#

2008-10-24 Thread Simon Wilcox
M wrote: > [% FOREACH customer IN DBI.query('SELECT * FROM customers ORDER BY [% baz > %]') %] Try [% query = 'SELECT * FROM customers ORDER BY ' _ baz %] [% FOREACH customer IN DBI.query( query ) %] S. ___ templates mailing list templates@template-

[Templates] [Fwd: Re: TT2 and Plugin CGI: GET params are not being updated]

2009-02-10 Thread Simon Wilcox
Hi Marc, On 10/2/09 07:34, Marc Sebastian Pelzer wrote: > thanks for the suggestions! I tried to disable the TT-Cache and also > to reset the CGI parameters after each call, but both does not help. > It seems like CGI.pm is not compatible with the Catalyst build in web- > server. CGI.pm isn'

Re: [Templates] Net::IP

2009-02-10 Thread Simon Wilcox
On 11/2/09 02:58, Brian Sherwood wrote: > Any help/suggestions are welcome. Using LOAD_PERL is usually a code smell, meaning that there's probably a better way of doing it. You might try creating a plugin for Net::IP. That should be fairly easy, see the docs at http://search.cpan.org/~abw/Templa

Re: [Templates] Net::IP

2009-02-12 Thread Simon Wilcox
Hi Brian, On 11/2/09 02:58, Brian Sherwood wrote: > I am trying to use the Net::IP module within a template and seem to be > having some problems. > I am setting LOAD_PERL and just loading the standard Perl Net::IP module. I don't think this is a TT problem. The equivalent perl code doesn't wor

Re: [Templates] perl warnings in apache logs

2009-10-21 Thread Simon Wilcox
Hi, On 21/10/09 19:41, Travis Basevi wrote: > Intriguing, I do so: > > > perl -MTemplate -le 'Template->new->process(\q[[% 1 + "" %]])' > Argument "" isn't numeric in addition (+) at input text line 1. > 1 > > What could I be missing (or not)? That seems like a reasonable warning to me. An emp

Re: [Templates] perl warnings in apache logs

2009-10-22 Thread Simon Wilcox
On 22/10/09 01:03, Travis Basevi wrote: [snip stuff] > I suspect, without easily being able to test it, that the only issue is > that TT is acting differently between perl 5.8 and 5.10, and the version > of TT is irrelevant. Doesn't this make it a TT issue? You missed the bit where I said: >

Re: [Templates] perl warnings in apache logs

2009-10-22 Thread Simon Wilcox
On 22/10/09 14:24, Bill Moseley wrote: > Interestingly enough, the suppression of the undefined values (foo.bar > when foo is undefined) turns out to be a valuable feature in creating > clean templates, for example [% IF foo.bar %] is often all that is > needed instead of a nested IF foo.define