You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Josh Chamas <jo...@chamas.com> on 2002/07/10 05:46:14 UTC

RFC: XMLSubs <%= %> in attributes

Hey,

I am working on the next release of Apache::ASP, which seems
like it will be a major one.  In particular, I will be adding support
for <%= %> in the XMLSubs attributes, but this functionality
will not be backward compatible with the default raw perl arguments.

I would like your comments on this matter if interested.
I believe, though painful, fixing this part of XMLSubs is a
good long term move, and making this the default is for the best.

<%= %> expressions will be allowed in XMLSubs attributes, as in:

  <my:tag arg="<%= $object->{member} %>" />

This new functionality makes XMLSubs more ASPish, and does not rely
on perl string interpolation for dynamic arguments to XMLSubs.
The old method of attribute data being interpreted as raw
perl strings would be deprecated.  These old tags could look like:

  <my:tag arg="$object{member}" />

This old functionality is not compatible with the new,
but would be activated with:

  PerlSetVar XMLSubsPerlArgs 1

Applications relying on this old behavior will have to use
this config to continue to work.

-- Josh
________________________________________________________________
Josh Chamas, Founder                   phone:714-625-4051
Chamas Enterprises Inc.                http://www.chamas.com
NodeWorks Link Checking                http://www.nodeworks.com


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: RFC: XMLSubs <%= %> in attributes

Posted by Philip Mak <pm...@animeglobe.com>.
On Tue, Jul 09, 2002 at 09:22:14PM -0700, Josh Chamas wrote:
> While we are talking about good configs, how about making
> UseStrict 1 the default at the same time?!  This would be of
> great benefit to developers in the long term, but the migration
> pains would be great.  This is one of the greatest pains
> for mod_perl development generally, when one does not have
> "use strict" & ends up with odd globals shared.

I agree that "PerlSetVar UseStrict 1" is a Good Thing. I use it on all
my mod_perl sites; it seems to be just asking for trouble otherwise.

> We can have beta releases like 2.90_01 that won't get
> installed by CPAN, and which would lead up to 3.00 stable
> release.  The big 3.00 release should give developers enough
> pause to read the CHANGES before installing I would hope.

Sounds like a plan.

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: RFC: XMLSubs <%= %> in attributes

Posted by Josh Chamas <jo...@chamas.com>.
Philip Mak wrote:
 > ...
> Sounds good.
> 
> It might make sense to set XMLSubsPerlArgs to 1 by default for
> backward compatibility reasons. If not, there should be a *very
> visible* note in the changelog to tell people not to upgrade their
> Apache::ASP version blindly without considering that setting first.
> 

I agree totally on making the warning BIG & very VISIBLE.
I do not want to keep the old behavior as default though,
as I believe the defaults should be set to be preferred
or "standard" configs.

While we are talking about good configs, how about making
UseStrict 1 the default at the same time?!  This would be of
great benefit to developers in the long term, but the migration
pains would be great.  This is one of the greatest pains
for mod_perl development generally, when one does not have
"use strict" & ends up with odd globals shared.

We can have beta releases like 2.90_01 that won't get
installed by CPAN, and which would lead up to 3.00 stable
release.  The big 3.00 release should give developers enough
pause to read the CHANGES before installing I would hope.

--Josh
________________________________________________________________
Josh Chamas, Founder                   phone:714-625-4051
Chamas Enterprises Inc.                http://www.chamas.com
NodeWorks Link Checking                http://www.nodeworks.com


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: RFC: XMLSubs <%= %> in attributes

Posted by Philip Mak <pm...@animeglobe.com>.
On Tue, Jul 09, 2002 at 08:46:14PM -0700, Josh Chamas wrote:
> <%= %> expressions will be allowed in XMLSubs attributes, as in:
> 
>  <my:tag arg="<%= $object->{member} %>" />

That will be nice. I tried to do that ever since I first found out
about XMLSubs.

> This old functionality is not compatible with the new,
> but would be activated with:
> 
>  PerlSetVar XMLSubsPerlArgs 1

Sounds good.

It might make sense to set XMLSubsPerlArgs to 1 by default for
backward compatibility reasons. If not, there should be a *very
visible* note in the changelog to tell people not to upgrade their
Apache::ASP version blindly without considering that setting first.

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org