[ANNOUNCE] Apache::ASP 2.35 bugfix release
Hey, I have released Apache::ASP 2.35 to CPAN. This is a minor bugfix release. For more information about Apache::ASP, please see http://www.apache-asp.org, and to get on the mailing list please email [EMAIL PROTECTED] Note that users of CPANPLUS get errors at make test stage because it seems that Archive::Tar does not untar the Apache::ASP distribution correctly. I have reported this bug to the maintainer of that module. -- Josh _ Joshua Chamas Chamas Enterprises Inc. NodeWorks Founder Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051 =item $VERSION = 2.35; $DATE=05/30/2002 +Destroy better $Server $Response objects so that my closure references to these to not attempt to work in the future against invalid internal data. There was enough data left in these old objects to make debugging the my closure problem confusing, where it looked like the ASP object state became invalid. +Added system debug diagnostics to inspect StateManager group cleanup (d) Documentation update about flock() work around for Win95/Win98/WinMe systems, confirmed by Rex Arul (d) Documentation/site build bug found by Mitsunobu Ozato, where % % not being escaped correctly with $Server-HTMLEncode(). New japanese documentation project started by him at http://sourceforge.jp/projects/apache-asp-jp/ -InitPackageGlobals() called after new Apache::ASP object created so core system templates can be compiled even when there was a runtime compilation error of user templates. Bug fix needed pointed out by Eamon Daly
Re: separating C from V in MVC
On Sat, 1 Jun 2002, Barry Hoggard wrote: I don't think the standard HTML::Template has support for formatting numbers, dates, etc. And thank the sweet lord it doesn't! HTML::Template is a do one thing and do it well module. If you want routines for formatting numbers, dates, etc. then CPAN has just what you need. How do you make sure that it's done consistently in your applications? Code reviews and testing. I don't know of any other way, module support or no module support. It seems problematic to me to require the programmers to do work when a designer wants to change the number of decimals in a page, for example. HTML::Template::Expr may present a solution to this particular desire, although it isn't one I've come across. How often are HTML designers fiddling with numeric formats? Are they really HTML designers if they can deal with, say, a printf-style format string? -sam
Apache-server_root_relative(); not found
HI, sorry if this is the wrong place, I am new to the mailing list. I have apache/1.3.23 and mod_perl/1.27 (I just upgraded) and perl/5.6.0 When I try: BEGIN { use Apache (); use lib Apache-server_root_relative('lib/perl'); } I get compilation errors saying that it can't locate object method server_root_relative via pachage Apache. BEGIN failed. Can any-one help me out or point me in the right direction? Thanks -Justin Hannus student [EMAIL PROTECTED]
Re: separating C from V in MVC
It seems problematic to me to require the programmers to do work when a designer wants to change the number of decimals in a page, for example. HTML::Template::Expr may present a solution to this particular desire, although it isn't one I've come across. How often are HTML designers fiddling with numeric formats? Are they really HTML designers if they can deal with, say, a printf-style format string? Yes, they are, and printf isn't so much harder than JavaScript, style sheets, and templating tags. One place where this comes up is date formatting and internationalization. Making the model objects understand locale and act appropriately is not always a good approach, and supplying a date format in the template - which is all about appearance anyway - seems appropriate. This can also be useful when the same date needs to be displayed in multiple ways, like an abbreviated format on one page and a fixed length format in an e-mail template. You could make the controller do this sort of formatting before passing data off to the view, but I think it's an awkward fit and increases the coupling between components unnecessarilly. Obviously there are lots of ways to solve these problems, but what I like about doing it in the template is that it puts these concerns in the hands of the people who control the rest of the look-and-feel issues in the application, and gets them out of the perl programmers' way. - Perrin
Re: separating C from V in MVC
It is interesting to try and fit our approach into the MVC+template pattern Just to clarify, it's not MVC+template; it's just MVC. The templates are one way of implementing views. You could mix and match this where appropriate, so that your Excel view is a perl module with a set of formatting guidelines stored in a sort of style sheet, while your HTML view is simply a template executed by a templating module. I see the Controller as also responsible for deciding what to do with the results of rendering the DOM in Excel or HTML formats - Views don't decide how their results should be distributed. This is typically something you would put into the controller, since the view shouldn't have to worry about details like HTTP headers. - Perrin
Re: separating C from V in MVC
A String widget/template allows you to control the rendering of all fonts dynamically. If the String widget/template sees the incoming request is from IE5+, it doesn't render the font if the font is the same as the default font. The Style widget/template renders the default font in a style if the browser is IE5+. This avoids the stylesheet bugs in all other browsers and gives 90% of your users who are running IE5+ a much lighter weight page. It's cumbersome to do wrap all text in string templates, because the calling mechanism is verbose. Most template languages I've looked at only support named parameters. Widgets can have named parameters, e.g. String({ value = ['User.first_name'], string_font = 'my_first_name_font', }); but it is much more convenient to use positional notation: String(['User.first_name'], 'my_first_name_font'); You can actually do that pretty comfortably with Template Toolkit. You could use a filter for example, which might look like this: [% FILTER font('my_first_name_font') %] ... some text, possibly with other template directives in it... [% END %] The filter is a module which would get to post-process the output of the contained block. I believe the taglibs in AxKit could be used in a similar way. - Perrin
cvs commit: modperl-2.0/t/response/TestModperl subenv.pm
stas2002/06/02 06:28:18 Modified:t/response/TestModperl subenv.pm Log: no logic change, just re-grouping the code so it's easier to read what's being tested Revision ChangesPath 1.2 +3 -14 modperl-2.0/t/response/TestModperl/subenv.pm Index: subenv.pm === RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/subenv.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- subenv.pm 21 May 2002 02:50:39 - 1.1 +++ subenv.pm 2 Jun 2002 13:28:18 - 1.2 -16,27 +16,22 plan $r, tests = 16; my $env = $r-subprocess_env; - ok $env; +# subprocess_env in void context populates the same as +SetEnv ok_false($r, 'REMOTE_ADDR'); - -$r-subprocess_env; #void context populates +$r-subprocess_env; +ok_true($r, 'REMOTE_ADDR'); $env = $r-subprocess_env; #table may have been overlayed -ok_true($r, 'REMOTE_ADDR'); - $env-set(FOO = 1); - ok_true($r, 'FOO'); $r-subprocess_env(FOO = undef); - ok_false($r, 'FOO'); $r-subprocess_env(FOO = 1); - ok_true($r, 'FOO'); Apache::OK; -46,11 +41,8 my($r, $key) = _; my $env = $r-subprocess_env; - ok $env-get($key); - ok $env-{$key}; - ok $r-subprocess_env($key); } -58,11 +50,8 my($r, $key) = _; my $env = $r-subprocess_env; - ok ! $env-get($key); - ok ! $env-{$key}; - ok ! $r-subprocess_env($key); }