From simon@simon-cozens.org Thu Apr 1 17:43:54 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Thu, 1 Apr 2004 17:43:54 +0100 Subject: [Maypole] TPF Hacking, day 1 Message-ID: <20040401164354.GA15902@alibi.simon-cozens.org> * I wrote over 2500 words of the view documentation. That's about a third to a half of the view chapter. I was due to start working on Maypole::View::Mason, but I didn't quite get that far. * I wrote Maypole::CLI. This mutates any given Maypole application to use the command line as a front-end instead of Apache. You can say perl -MMaypole::CLI=BeerDB -e1 http://localhost/beer/list/ and it will spit the page to standard out. * This also allows me to write a test suite relatively easily. I started doing this. * I did some minor refactoring and miscellaneous fix-ups. * I silenced some Class::DBI::AsForm warnings and removed some redundancy. -- "In matters of principle, stand like a rock; in matters of taste, swim with the current." -- Thomas Jefferson From drew@drewtaylor.com Fri Apr 2 01:41:32 2004 From: drew@drewtaylor.com (Drew Taylor) Date: Thu, 01 Apr 2004 19:41:32 -0500 Subject: [Maypole] Running under CGI Message-ID: <406CB6BC.6040009@drewtaylor.com> I'd like to give Maypole a try, but I currently don't have access to a mod_perl enabled host. Can Maypole be run as a CGI? I don't have a problem running from CVS. Drew -- --------------------------------------------------------- Drew Taylor * Web app development & consulting drew@drewtaylor.com * Site implementation & hosting www.drewtaylor.com * perl/mod_perl/DBI/mysql/postgres --------------------------------------------------------- From drew@drewtaylor.com Fri Apr 2 01:51:18 2004 From: drew@drewtaylor.com (Drew Taylor) Date: Thu, 01 Apr 2004 19:51:18 -0500 Subject: [Maypole] CVS access Message-ID: <406CB906.60802@drewtaylor.com> The directions at http://maypole.simon-cozens.org/download.html give me an error when trying to checkout Maypole via CVS. Browsing through cvsweb, it looks like Maypole is nota separate module but still part of Apache::MVC. Can I get to Maypole separately? Drew -- --------------------------------------------------------- Drew Taylor * Web app development & consulting drew@drewtaylor.com * Site implementation & hosting www.drewtaylor.com * perl/mod_perl/DBI/mysql/postgres --------------------------------------------------------- From simon@simon-cozens.org Fri Apr 2 09:54:50 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Fri, 2 Apr 2004 09:54:50 +0100 Subject: [Maypole] CVS access In-Reply-To: <406CB906.60802@drewtaylor.com> References: <406CB906.60802@drewtaylor.com> Message-ID: <20040402085450.GB32393@alibi.simon-cozens.org> Drew Taylor: > The directions at http://maypole.simon-cozens.org/download.html give me > an error when trying to checkout Maypole via CVS. Browsing through > cvsweb, it looks like Maypole is nota separate module but still part of > Apache::MVC. Can I get to Maypole separately? The Maypole project is the "Apache-MVC" module in CVS. I didn't rename the CVS module when I renamed the project, because there's not much point in doing so. Just check out Apache-MVC, as it says in the instructions. -- Old Japanese proverb: There are two kinds of fools -- those who never climb Mt. Fuji, and those who climb it twice. From simon@simon-cozens.org Fri Apr 2 09:56:59 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Fri, 2 Apr 2004 09:56:59 +0100 Subject: [Maypole] Running under CGI In-Reply-To: <406CB6BC.6040009@drewtaylor.com> References: <406CB6BC.6040009@drewtaylor.com> Message-ID: <20040402085659.GC32393@alibi.simon-cozens.org> Drew Taylor: > I'd like to give Maypole a try, but I currently don't have access to a > mod_perl enabled host. Can Maypole be run as a CGI? I don't have a > problem running from CVS. An intial version of CGI::Maypole is here: http://lists.netthink.co.uk/pipermail/maypole/2004-March/000018.html Now Maypole has been tidied up a bit, I want to refactor that and put it into the Maypole core. I guess I could do that today. Stay tuned. -- A person is smart. People are dumb, panicky dangerous animals and you know it. - Agent J, Men in Black From simon@simon-cozens.org Fri Apr 2 13:33:39 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Fri, 2 Apr 2004 13:33:39 +0100 Subject: [Maypole] Running under CGI In-Reply-To: <20040402085659.GC32393@alibi.simon-cozens.org> References: <406CB6BC.6040009@drewtaylor.com> <20040402085659.GC32393@alibi.simon-cozens.org> Message-ID: <20040402123339.GA30548@alibi.simon-cozens.org> Simon Cozens: > Now Maypole has been tidied up a bit, I want to refactor [CGI::Maypole] and > put it into the Maypole core. I guess I could do that today. Stay tuned. I've done this, and added it to Maypole. -- On our campus the UNIX system has proved to be not only an effective software tool, but an agent of technical and social change within the University. - John Lions (U. of NSW) From drew@drewtaylor.com Fri Apr 2 16:23:38 2004 From: drew@drewtaylor.com (Drew Taylor) Date: Fri, 02 Apr 2004 10:23:38 -0500 Subject: [Maypole] CVS access In-Reply-To: <20040402085450.GB32393@alibi.simon-cozens.org> References: <406CB906.60802@drewtaylor.com> <20040402085450.GB32393@alibi.simon-cozens.org> Message-ID: <406D857A.4020004@drewtaylor.com> Simon Cozens wrote: > Drew Taylor: > >>The directions at http://maypole.simon-cozens.org/download.html give me >>an error when trying to checkout Maypole via CVS. Browsing through >>cvsweb, it looks like Maypole is nota separate module but still part of >>Apache::MVC. Can I get to Maypole separately? > > > The Maypole project is the "Apache-MVC" module in CVS. I didn't rename the CVS > module when I renamed the project, because there's not much point in doing so. > Just check out Apache-MVC, as it says in the instructions. That's not the problem - I can't even get access to CVS' pserver. Did the repository location change? cvs -d:pserver:cvs@cvs.simon-cozens.org:/var/cvs/modules/ login Logging in to :pserver:cvs@cvs.simon-cozens.org:2401/var/cvs/modules/ CVS password: /var/cvs/modules/: no such repository Drew -- ---------------------------------------------------------------- Drew Taylor * Web development & consulting Email: drew@drewtaylor.com * Site implementation & hosting Web : www.drewtaylor.com * perl/mod_perl/DBI/mysql/postgres ---------------------------------------------------------------- From simon@simon-cozens.org Fri Apr 2 16:25:26 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Fri, 2 Apr 2004 16:25:26 +0100 Subject: [Maypole] CVS access In-Reply-To: <406D857A.4020004@drewtaylor.com> References: <406CB906.60802@drewtaylor.com> <20040402085450.GB32393@alibi.simon-cozens.org> <406D857A.4020004@drewtaylor.com> Message-ID: <20040402152526.GB4966@alibi.simon-cozens.org> Drew Taylor: > cvs -d:pserver:cvs@cvs.simon-cozens.org:/var/cvs/modules/ login Mea culpa. Drop this final / ^ I'll fix the web site. -- "He was a modest, good-humored boy. It was Oxford that made him insufferable." From drew@drewtaylor.com Fri Apr 2 16:36:08 2004 From: drew@drewtaylor.com (Drew Taylor) Date: Fri, 02 Apr 2004 10:36:08 -0500 Subject: [Maypole] CVS access In-Reply-To: <20040402152526.GB4966@alibi.simon-cozens.org> References: <406CB906.60802@drewtaylor.com> <20040402085450.GB32393@alibi.simon-cozens.org> <406D857A.4020004@drewtaylor.com> <20040402152526.GB4966@alibi.simon-cozens.org> Message-ID: <406D8868.7020402@drewtaylor.com> Simon Cozens wrote: > Drew Taylor: > >>cvs -d:pserver:cvs@cvs.simon-cozens.org:/var/cvs/modules/ login > > Mea culpa. Drop this final / ^ Cool. But now I'm having problems checking out the module: cvs -d:pserver:cvs@cvs.simon-cozens.org:/var/cvs/modules co Apache-MVC cvs server: Updating Apache-MVC U Apache-MVC/Changes U Apache-MVC/MANIFEST U Apache-MVC/META.yml U Apache-MVC/Makefile.PL U Apache-MVC/README U Apache-MVC/TODO cvs server: Updating Apache-MVC/doc cvs server: failed to create lock directory for `/var/cvs/modules/Apache-MVC/doc' (/var/cvs/modules/Apache-MVC/doc/#cvs.lock): Permission denied cvs server: failed to obtain dir lock in repository `/var/cvs/modules/Apache-MVC/doc' cvs [server aborted]: read lock failed - giving up -- ---------------------------------------------------------------- Drew Taylor * Web development & consulting Email: drew@drewtaylor.com * Site implementation & hosting Web : www.drewtaylor.com * perl/mod_perl/DBI/mysql/postgres ---------------------------------------------------------------- From simon@simon-cozens.org Fri Apr 2 16:38:15 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Fri, 2 Apr 2004 16:38:15 +0100 Subject: [Maypole] CVS access In-Reply-To: <406D8868.7020402@drewtaylor.com> References: <406CB906.60802@drewtaylor.com> <20040402085450.GB32393@alibi.simon-cozens.org> <406D857A.4020004@drewtaylor.com> <20040402152526.GB4966@alibi.simon-cozens.org> <406D8868.7020402@drewtaylor.com> Message-ID: <20040402153815.GC4966@alibi.simon-cozens.org> Drew Taylor: > Cool. But now I'm having problems checking out the module: Damnation. I hate CVS. Try now. -- Just imagine we are meeting the aliens for the first time. Most people would just shoot them to see how many points they are worth. From drew@drewtaylor.com Fri Apr 2 17:08:12 2004 From: drew@drewtaylor.com (Drew Taylor) Date: Fri, 02 Apr 2004 11:08:12 -0500 Subject: [Maypole] CVS access In-Reply-To: <20040402153815.GC4966@alibi.simon-cozens.org> References: <406CB906.60802@drewtaylor.com> <20040402085450.GB32393@alibi.simon-cozens.org> <406D857A.4020004@drewtaylor.com> <20040402152526.GB4966@alibi.simon-cozens.org> <406D8868.7020402@drewtaylor.com> <20040402153815.GC4966@alibi.simon-cozens.org> Message-ID: <406D8FEC.9060802@drewtaylor.com> Simon Cozens wrote: > Drew Taylor: > >>Cool. But now I'm having problems checking out the module: > > > Damnation. I hate CVS. Try now. Success! Thanks for fixing things up. I'm looking forward to trying out the CGI support this weekend. Drew -- ---------------------------------------------------------------- Drew Taylor * Web development & consulting Email: drew@drewtaylor.com * Site implementation & hosting Web : www.drewtaylor.com * perl/mod_perl/DBI/mysql/postgres ---------------------------------------------------------------- From simon@simon-cozens.org Fri Apr 2 19:02:04 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Fri, 2 Apr 2004 19:02:04 +0100 Subject: [Maypole] TPF Hacking, day 2 Message-ID: <20040402180204.GA12328@alibi.simon-cozens.org> * Tidied up Dave Ranney's CGI::Maypole to use the new parse_path abstraction, and integrated it into the core. * Wrote about 1000 words of material in the About.pod introductory section. * Wrote about 1000 words to complete the view classes chapter. One down, four to go. * Refactored Maypole::View::TT to use the new Maypole::View::Base. * Wrote Maypole::View::Mason. -- sub UNIVERSAL::AUTOLOAD{ $UNIVERSAL::AUTOLOAD =~ s/::/ /; print "$UNIVERSAL::AUTOLOAD "}; hacker perl another just; From simon@simon-cozens.org Fri Apr 2 19:34:25 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Fri, 2 Apr 2004 19:34:25 +0100 Subject: [Maypole] TPF Hacking, day 2 In-Reply-To: <20040402180204.GA12328@alibi.simon-cozens.org> References: <20040402180204.GA12328@alibi.simon-cozens.org> Message-ID: <20040402183425.GA14094@alibi.simon-cozens.org> Simon Cozens: > * Wrote about 1000 words to complete the view classes chapter. One down, > four to go. Yeah, I should have mentioned: if anyone can take a look over this chapter (doc/View.pod) and check for obvious mistakes, typos, unfulfilled references and so on, I'd be very grateful. See if it answers all your questions about view classes! -- I respect faith, but doubt is what gives you an education. -- Wilson Mizner From simon@simon-cozens.org Mon Apr 5 23:21:33 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Mon, 5 Apr 2004 23:21:33 +0100 Subject: [Maypole] TPF Hacker, day 3 Message-ID: <20040405222133.GA30427@alibi.simon-cozens.org> Some days you win, and some days you lose. Today, after two days of productive Maypole hacking, I most definitely lost, and only managed to achieve: * 200 words of Flox.pod intro * 600 words of Request.pod Tomorrow I may lose too, since I have half a Ruby tutorial to write by Wednesday afternoon. -- A witty saying means nothing. -Voltaire From simon@simon-cozens.org Tue Apr 6 17:21:46 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Tue, 6 Apr 2004 17:21:46 +0100 Subject: [Maypole] TPF hacking, day 4 Message-ID: <20040406162146.GA8797@alibi.simon-cozens.org> Sorry to bombard you guys with daily stuff, but I'm doing this for two reasons. First, some of the advances I'm making are actually pretty important, and if you're stuck with any Maypole problems you really ought to check it out. Second, I think that it's very important that I keep people fully informed with how I'm spending the TPF's hard-donated money. In a sense, communicating clearly the gains that the TPF grant has allowed is one of my ways of saying "thank you". So onto today's achievements: * Analysis of iBuySpy portal, (converting MS SQL to Mysql, oh boy) leading to... * Maypole::Component. This is a nice one; you might want to take a look at it. It allows you to call Maypole requests inside a Maypole request. For instance, if you're writing a portal site (good link, eh?) you'll want to say things like:
[% request.component("/news/latest_comp") %]
to include the output of Maypole calls inside the original request. This is a great way to solve the pages-with-multiple-types-of-object problem. * Refactoring of Maypole.pm to make that happen cleanly. * Refactoring of error handling in the view classes so everything uses the same constants. * 1500 words of the Flox chapter. This is turning into a very nice introduction to how to go about creating big applications in Maypole, although it relies extremely heavily on... * 2000 words of the Request chapter. I'm enjoying writing the request chapter, and encourage you guys to flick through it. (It's at http://cvs.simon-cozens.org/viewcvs.cgi/Apache-MVC/doc/Request.pod?rev=HEAD&content-type=text/vnd.viewcvs-markup ) It's mainly a rehash of the Maypole Cookbook wiki page, but with lots of explanation added. -- If my life is for rent, and I don't look to buy, Then I deserve nothing more than I get, 'Cos nothing I have is truly mine. From drew@drewtaylor.com Tue Apr 6 17:44:55 2004 From: drew@drewtaylor.com (Drew Taylor) Date: Tue, 06 Apr 2004 12:44:55 -0400 Subject: [Maypole] TPF hacking, day 4 In-Reply-To: <20040406162146.GA8797@alibi.simon-cozens.org> References: <20040406162146.GA8797@alibi.simon-cozens.org> Message-ID: <4072DE87.80204@drewtaylor.com> Simon Cozens wrote: > Sorry to bombard you guys with daily stuff, but I'm doing this for two > reasons. I rather like the daily updates myself. The summaries are very useful. > Second, I think that it's very important that I keep people fully informed > with how I'm spending the TPF's hard-donated money. Agreed, doubly so since it's donated money. But so far I think we're getting a pretty good deal for the investment. :-) The documentation is especially helpful to me as I prepare to start making a "real" application w/ Maypole. > * Maypole::Component. This is a nice one; you might want to take a look at it. > It allows you to call Maypole requests inside a Maypole request. For instance, > if you're writing a portal site (good link, eh?) you'll want to say things > like: > >
> [% request.component("/news/latest_comp") %] >
> > > > to include the output of Maypole calls inside the original request. This > is a great way to solve the pages-with-multiple-types-of-object problem. Ala Mason. :-) Very cool stuff. Do you have the options like mason of comp() vs $content = scomp()? Also, is M::Component a separate release? I didn't see it when I updated from CVS. Drew -- ---------------------------------------------------------------- Drew Taylor * Web development & consulting Email: drew@drewtaylor.com * Site implementation & hosting Web : www.drewtaylor.com * perl/mod_perl/DBI/mysql/postgres ---------------------------------------------------------------- From essuu@ourshack.com Tue Apr 6 17:55:37 2004 From: essuu@ourshack.com (Simon Wilcox) Date: Tue, 6 Apr 2004 17:55:37 +0100 (BST) Subject: [Maypole] TPF hacking, day 4 In-Reply-To: <4072DE87.80204@drewtaylor.com> Message-ID: On Tue, 6 Apr 2004, Drew Taylor wrote: > Simon Cozens wrote: > > > Sorry to bombard you guys with daily stuff, but I'm doing this for two > > reasons. > > I rather like the daily updates myself. The summaries are very useful. Same here. Maypole's evolving as fast as I can clear the backlog of work so that I can start tinkering with it so it's very useful to keep up to date with the latest situation. > Ala Mason. :-) Very cool stuff. Do you have the options like mason of > comp() vs $content = scomp()? Also, is M::Component a separate release? > I didn't see it when I updated from CVS. http://search.cpan.org/~simon/Maypole-Component-0.01/ HTH. Simon Wilcox. From simon@simon-cozens.org Tue Apr 6 17:59:48 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Tue, 6 Apr 2004 17:59:48 +0100 Subject: [Maypole] TPF hacking, day 4 In-Reply-To: <4072DE87.80204@drewtaylor.com> References: <20040406162146.GA8797@alibi.simon-cozens.org> <4072DE87.80204@drewtaylor.com> Message-ID: <20040406165948.GA10208@alibi.simon-cozens.org> Drew Taylor: > Agreed, doubly so since it's donated money. But so far I think we're > getting a pretty good deal for the investment. :-) That's the training from the other half of my life coming out. :) > The documentation is especially helpful to me as I prepare to start making a > "real" application w/ Maypole. Documentation and examples makes or breaks an open source project, simple as that. This is why my grant application put so much emphasis on writing the examples, articles and the manual - improvements to the code will and have been falling out of that directly. > Ala Mason. :-) Very cool stuff. Do you have the options like mason of > comp() vs $content = scomp()? [% request.component %] is equivalent to $r->component; it returns a string, so it's kind of like scomp, but putting in the template there causes the output to go into the template output. -- Congratulations, Simon - I think I've finally discovered someone with a mind that is more warped than mine. - Lionel Lauer From tony@kasei.com Tue Apr 6 21:49:47 2004 From: tony@kasei.com (Tony Bowden) Date: Tue, 6 Apr 2004 21:49:47 +0100 Subject: [Maypole] TPF hacking, day 4 In-Reply-To: <20040406162146.GA8797@alibi.simon-cozens.org> References: <20040406162146.GA8797@alibi.simon-cozens.org> Message-ID: <20040406204946.GA812@soto.kasei.com> > You've just issued an action like C, which updates the > database. You don't want to display a page that says "Record updated" > or similar. Lesser application servers would issue a redirect to have the > browser request C> instead, but we can actually modify > the Maypole request on the fly and, after doing the update, pretend that > we were going to C> all along. We do this by setting > the objects in the C slot and changing the C