Re: [htmltmpl] ANNOUNCEMENT: HTML::Template 2.6

2002-08-29 Thread Chisel Wright

On Fri, Aug 30, 2002 at 05:13:33PM -0400, Sam Tregar wrote:
> CHANGES
>- New Feature: The default attribute allows you to specify
>   defaults for  tags.
> 
>- Bug Fix: fixed parser to reject s with no names.
>   (crazyinsomniac)
> 

Whoever pasted the chages into sourceforge
(http://sourceforge.net/project/shownotes.php?release_id=107880)
forgot to replace '<' with '<' etc.

HTML::Template is so damn good I can only moan about small errors
in release notes.

:)

Chisel


-- 
e:   [EMAIL PROTECTED]   | MS Outlook - Where do you want your
w:   www.herlpacker.co.uk  | files to go today?  
gpg: D167E7FE  | 


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users



[htmltmpl] fw: Re: webmail

2002-10-30 Thread Chisel Wright
I don't know if you're interested in this snippet from the london.pm
mailing list...

:)


Chiz


- Forwarded message from Dave Cross -

Subject: Re: webmail
Date: Wed, 30 Oct 2002 06:39:15 +
To: [EMAIL PROTECTED]

On Tue, Oct 29, 2002 at 09:58:07AM +0000, Chisel Wright ([EMAIL PROTECTED]) 
wrote:
> On Tue, Oct 29, 2002 at 09:32:19AM +, Dave Cross wrote:
> > Depends what you're doing I guess. At least half of what I do with 
> > templates has nothing at all to do with generating HTML so it makes
> > no sense to use a templating system that is tied to producing HTML.
> 
> I guess the name is misleading.
> I've used H::T for templating in general.
> 
> I guess HTML was what it was originally intended to template, but it's
> not tied to it.

Module naming is very important. I wonder how many other people have
been put off using HTML::Template because they aren't building HTML
with their templates?

Perhaps you could suggest a name change to the author. Maybe something
like Not::Just::HTML::Template.

Dave...

-- 
  Drugs are just bad m'kay

- End forwarded message -

-- 
e:   [EMAIL PROTECTED]   | Hey, this is my sig, if you don't like
w:   www.herlpacker.co.uk  | it, STOP READING MY EMAILS!  
gpg: D167E7FE  | 


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users



[htmltmpl] H::T GUIDE FOR WEB DESIGNERS

2003-02-10 Thread Chisel Wright
Hi there,

I've been using H::T for some time now, and I've conviced the team here
that H::T is a better tool for our needs than other modules in a similar
genre.

Here, as at many places, we split the coding and the HTML design between
programmers and web-designers. We've hit upon a small problem though.

Although the syntax for H::T is simple, and we're not asking the
web-designers to add any H::T tags (yet). We'd just like them to not
trash the tags we insert into the html and pass back to them.

I'm not asking for a technical solution for this. There isn't one for
stupidity/laziness as far as I know.

What I was wondering was if there are any guides in existence along the
lines of "H::T for web designers". An intro, example of some simple tag
usage (so they can spot thos hard-to-find H::T tags :-) - you get the
idea.

I know there's not a hell of a lot to it, but I'm just wondering if
there are other points I might want to cover in the document I'm going
to be writing later this week.

Is H::T syntax too close to HTML tags for someone to understand?
Should we be using tags in a different format, and then using a filter?

I don't know - I'm just fishing for ideas and comments to give me
something to think about before I knuckle down to write something for
our web team.

Regards,

Chisel
-- 
e:   [EMAIL PROTECTED]   | I have pillows shipped UPS so when I
w:   www.herlpacker.co.uk  | get them they are already pre-pounded 
gpg: D167E7FE  | and fluffy.  


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users



Re: [htmltmpl] H::T GUIDE FOR WEB DESIGNERS

2003-02-10 Thread Chisel Wright
On Mon, Feb 10, 2003 at 12:28:46PM -0500, Sam Tregar wrote:
> I don't believe there is, but it sounds like a good idea.  Maybe you'd
> like to write one?  If you did, I'd be happy to post it on the
> HTML::Template site.

I'll see how it goes, but I forsee two problems:

 1. It might be too  specific Not having started on this I
 can't say either way yet.

 2. Since it's for  I might bet bitten by IP restrictions in
 my contract. I'll mention it to the relevant people and see what
 happens.

Chisel
-- 
e:   [EMAIL PROTECTED]   | Obey
w:   www.herlpacker.co.uk  | http://www.ietf.org/rfc/rfc1855.txt  
gpg: D167E7FE  | 


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users



Re: [htmltmpl] catch the carp::croak() death...

2003-06-27 Thread Chisel Wright
On Fri, Jun 27, 2003 at 04:52:23AM -0400, Chris Reinhardt wrote:
> eval { ...code that dies... };
> if ($@) {
>   # There was an error in the eval {}
> }

I've always been uncomfortable using eval().
I know /how/ to use it, but it just feels dirty.

What are the negative effects (if any) of using eval()?

I'm curious why the call to H::T->new() has to die, and not just return undef..

I'd love to be able to do something along the lines of:

 my $ht = HTML::Template->new(...)
   or my_error_handling_routine(...);

instead of:

 eval (
  $ht = HTML::Template->new(...);
 );

Chisel
-- 
e:   [EMAIL PROTECTED]   | They asked how many employees we had,
w:   www.herlpacker.co.uk  | broken down by sex. Told them drugs
gpg: D167E7FE  | and alcohol was more of a problem.


---
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
___
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users


[htmltmpl] HTML::Template for Web Designers

2003-08-01 Thread Chisel Wright
A large number of weeks ago I asked about a guide for web
developers/designers using H::T.

The response at the time was "I don't believe there is, but it sounds
like a good idea.  Maybe you'd like to write one? "

Life got in the way for a while, but I finally got around to accepting
the challenge.

I've passed it around the (perl) developers and web designers in my
office, and the webbies have actually said it helped them, so I'm
sharing the URL with the H::T list in the hope that others out there may
find it useful too:

  http://www.herlpacker.co.uk/articles/

It's quite easy to find, it's the "HTML::Template for Web Designers"
article and is currently the only article there.

Chisel
-- 
e:   [EMAIL PROTECTED]   | They asked how many employees we had,
w:   www.herlpacker.co.uk  | broken down by sex. Told them drugs
gpg: D167E7FE  | and alcohol was more of a problem.


---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users


Re: [htmltmpl] Fun with Filters.

2003-08-14 Thread Chisel Wright
On Wed, Aug 13, 2003 at 09:31:54AM -0500, Jeff Pelkey wrote:
> YA?: What does the "$$" mean in $$test_ref.

$text_ref is a reference to a scalar, so to get the text itself you need
to dereference it.
It's proably easier to understand if you think of it as ${$text_ref}.
It's the same as you'd do with hash an array references.

> my $filter = sub {
>   my $text_ref = shift;
>   $text_ref =~ s/!!!ZAP_(.*?)!!!//g;
>   $$text_ref;
>   ## Also Tried Adding "return $text_ref;" - No Difference.
> };

I think that here you want:

  $$text_ref =~ s/!!!ZAP_(.*?)!!!//g;

(as per the example in the H::T documentation)

> sub test_function {
>   ##my $str1 = shift;
>   my ($str1, $str2) = @_;
>   my $strTest = qq~Hi this is some text: '$str1-$str2'.~;
>   return $strTest;
> }

Do you get other arguments passed into a filter? I can't say I've ever
tried, but wouldn't expect more than $text_ref. However, you want to use
$$str1 to get the actual text held in str1, $str1 is a reference to a
scalar.

I think.

Chisel
-- 
e:   [EMAIL PROTECTED]  |I may contradict myself, but at least
w:   http://www.herlpacker.co.uk/ |  I don't contradict myself.
gpg: D167E7FE |


---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users


[htmltmpl] filter question

2003-11-20 Thread Chisel Wright
Hi,

I've just hit a mental block, and I don't know if it's something that's
not possible, or I'm just being stupid.

I'm using H::T wrapped inside a package:

  sub template($$) {

   ...

   $self->{'tpl'} = HTML::Template->new(
  ...
  'filter' => [
{ 'sub' => \&_filter_sections, 'format' => 'scalar' },
  ],
);
  }

What'd I'd like to do is have access to $self in _filter_sections() so I
can have something along these lines:

  sub _filter_sections {

...

my $section = $self->{'_conf'}{'section'} || 'some default value';
$$textref =~ s/\[%\s+section\s+%\]/$section/g;
  }


I've read the H::T podumentation, and can't see anything that says this
is possible.

Is it? If not any suggestions how to achieve the same effect a different
way. I'm loathe to use gloabal variables unless I really have to,

Thanks in advance,

Chisel
-- 
e:   [EMAIL PROTECTED]  |  The Victorian game of knocking on
w:   http://www.herlpacker.co.uk/ | somebody's door and running away is
gpg: D167E7FE |called "Parcel Force".


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users


FYI - [sam@tregar.com: [htmltmpl] HTML::Template v2.7 is Coming!]

2004-06-18 Thread Chisel Wright
FYI
-- 
e:   [EMAIL PROTECTED]  | Life would be so much easier if we
w:   http://www.herlpacker.co.uk/ |  just had the source code.
gpg: D167E7FE |
--- Begin Message ---
Hello all.  I'm sure it will come as a great shock, but I'm planning
to make a new release of HTML::Template sometime next week.  Here is
what I have so far:

   - Bug Fix: Improved cache keying to be sensitive to options which
  alter the compilation of templates (path, search_path,
  loop_context_vars and global_vars).  Calls to new() with
  different settings for any of these options will no longer pull
  incorrect cached objects.

   - Bug Fix: Added code to detect broken Perl 5.8.0 utf-8 during
  installation (i.e. Redhat 8 and 9).

   - Bug Fix: Fixed parsing of ESCAPE='URL' (Paul Baker)

It's that first one that's stimulating this release.  However, I know
a number of you have pending bugs and (shudder) new features that
you'd like to see addressed in the next release.  Now is the time to
get them in for 2.7.

If you're submitting a bug report please include a complete test case
that demonstrates the problem.  For extra points make it a patch to
test.pl in CVS.

If you're submitting a patch, please make it against CVS if you can.
If not then please make sure it was made against the 2.6 release.

Thanks!

-sam


---
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
___
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

--- End Message ---


Re: FYI - [sam@tregar.com: [htmltmpl] HTML::Template v2.7 is Coming!]

2004-06-18 Thread Chisel Wright
On Fri, Jun 18, 2004 at 09:24:01AM +0100, Chisel Wright wrote:
> FYI

I an such a tool. Too early, sent to wrong email alias. *DOH*

-- 
e:   [EMAIL PROTECTED]  |   Get pleasure out of the little
w:   http://www.herlpacker.co.uk/ |  things in life. Stand on an ant.
gpg: D167E7FE |


---
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
___
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users


Re: [htmltmpl] Question about syntax

2004-08-11 Thread Chisel Wright
On Wed, Aug 11, 2004 at 08:26:39AM -0500, Brad Cathey wrote:
> I've been using H::T for about a year have noticed variations in syntax. For
> example:
> 
> 
> 
> vs.
> 
>  (no quotes)
> 
> vs.
> 
> 
> 
> and finally:
> 
>  (drop 'name=')
> 
> I like the last one‹short and simple. Pros and cons, especially in my last
> example.

Initially I was a strict comments-only syntax user. Over the years I've
changed my view a little.

I now use comments-only syntax everywhere *except* inside tag
attributes, e.g.:

  

as opposed to

  ">

which screws up syntax higlighting to the Nth degree.

I could probably use:

  
  or
  

But I figure that when I'm inside an attribute I need to remove as much
'fluff' as possible to keep it legible.

Using the comment syntax elsewhere means that it shows up clearly in
vim, rather than just blending in (and should pass any HTML validation
too)

Just my tuppence,

Chisel
-- 
e:   [EMAIL PROTECTED]  |If you play a Windows XP installation
w:   http://www.herlpacker.co.uk/ | CDROM backwards, you hear a message
gpg: D167E7FE |from Satan. Even worse... if you play
  | it forwards, it installs Windows XP.


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users


Re: [htmltmpl] Question about syntax

2004-08-11 Thread Chisel Wright
On Wed, Aug 11, 2004 at 05:58:13PM +0200, Markus Spring wrote:
> That's where I use vanguard_compatibility_mode => 1 during load_tmpl - it's
> %myimage% syntax is unsurpassed short, but of course misses the possibility to
> decide about escaping...

Our HTML bunnies seem to struggle enough with stuff that looks like HTML
- not sure we can risk scaring them with % symbols yet!!

 "Yeah guys, you should use , but you can use < >, or if you
 like you can use % % too"

/me fears

-- 
e:   [EMAIL PROTECTED]  |Laughter is the best medicine. Find a
w:   http://www.herlpacker.co.uk/ |   person much poorer than you and
gpg: D167E7FE |laugh at them.


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users


Re: [htmltmpl] Re: eWeek Reviews Bricolage

2004-08-11 Thread Chisel Wright
On Wed, Aug 11, 2004 at 06:56:08PM -0400, Sam Tregar wrote:
> > Also it seems to be MySQL specific.  Did I read that wrong?
> 
> Nope, you got that right too.

Out of interest, why MySQL? I know that lack of Postgres support is one
reason that we didn't consider Krang recently when looking for a content
management system recently.

Not trying to start a flame-war. Were there technical reasons, or was it
a "I have time to make it work well with on database" thing?

Chisel
-- 
e:   [EMAIL PROTECTED]  |Opinions are like arseholes -
w:   http://www.herlpacker.co.uk/ |   everyone has one
gpg: D167E7FE |


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users