From dave@riverside-cms.co.uk Sun Aug 1 15:27:10 2004 From: dave@riverside-cms.co.uk (David R. Baird) Date: Sun, 01 Aug 2004 15:27:10 +0100 Subject: [Maypole] multiple Maypole applications Message-ID: <410D0BCE.13524.4D8616FF@localhost> Hi, Maypole has been on my list of things to investigate for a while. I finally got the chance over the weekend, wish I'd made the time before. It does exactly what it says on the box - applications up and running in minutes. Fantastic! So I tried adding a second Maypole application to my site, after getting the BeerDB thing up and running, but the config of the second application overwrites the first. The patch below fixes that, and everything seems to work fine. --- /.cpan/build/Maypole-1.7/blib/lib/Maypole.pm Sat Jul 17 20:15:20 2004 +++ Maypole.pm Sun Aug 1 10:26:21 2004 @@ -22,7 +22,8 @@ # Naughty. *{$calling_class."::handler"} = sub { Maypole::handler($calling_class, @_) }; } - my $config = $calling_class->config; + my $config = {}; + $calling_class->config($config); $config->{model} ||= "Maypole::Model::CDBI"; $config->{model}->require; die "Couldn't load the model class $config->{model}: $@" if $@; -- Dr. David R. Baird Riverside Content Management Systems dave@riverside-cms.co.uk http://www.riverside-cms.co.uk From dave@riverside-cms.co.uk Sun Aug 1 17:18:38 2004 From: dave@riverside-cms.co.uk (David R. Baird) Date: Sun, 01 Aug 2004 17:18:38 +0100 Subject: [Maypole] Announce: MasonX::Maypole Message-ID: <410D25EE.1398.4DEC240F@localhost> Hello, It seemed more natural to use Mason as a frontend to Maypole, rather than as a view, and preferable to use Mason in its normal mode, rather than standalone. This module removes most of the 'view' processing from the Maypole request cycle, leaving all that to Mason. It makes it trivial to add a Maypole app to an existing Mason site. Just add a couple of component roots, a simple autohandler and dhandler, and off you go. d. ------- Forwarded message follows ------- Date sent: Sun, 1 Aug 2004 17:31:46 +0200 Subject: CPAN Upload: D/DA/DAVEBAIRD/MasonX-Maypole- 0.01.tar.gz Send reply to: cpan-testers . at . perl.org To: "David R. Baird" From: PAUSE The uploaded file MasonX-Maypole-0.01.tar.gz has entered CPAN as file: $CPAN/authors/id/D/DA/DAVEBAIRD/MasonX-Maypole-0.01.tar.gz size: 7962 bytes md5: cff0295d0c6b61b82120498a23df9412 No action is required on your part Request entered by: DAVEBAIRD (David R. Baird) Request entered on: Sun, 01 Aug 2004 15:31:21 GMT Request completed: Sun, 01 Aug 2004 15:31:46 GMT Thanks, -- paused, v460 ------- End of forwarded message ------- -- Dr. David R. Baird Riverside Content Management Systems dave@riverside-cms.co.uk http://www.riverside-cms.co.uk From mfreeman451@gmail.com Sun Aug 1 17:37:51 2004 From: mfreeman451@gmail.com (Michael Freeman) Date: Sun, 1 Aug 2004 11:37:51 -0500 Subject: [Maypole] Re: problems with BeerDB In-Reply-To: <5fb170004073113052467fc5e@mail.gmail.com> References: <5fb170004073113052467fc5e@mail.gmail.com> Message-ID: <5fb1700040801093738458c2e@mail.gmail.com> I am trying to customize the BeerDB application and I added a bunch of fields to the database like a binary picture column and things like that. How do I customize the 'view' template to only display a few columns in each row? Thanks, Mike From jester@panix.com Mon Aug 2 17:51:21 2004 From: jester@panix.com (Jesse Sheidlower) Date: Mon, 2 Aug 2004 12:51:21 -0400 Subject: [Maypole] Dying a good death Message-ID: <20040802165120.GA777@panix.com> Twice recently I've had experiences were some error in a Maypole application has caused an improperly large set of results to be displayed. I was wondering if anyone else might have seen this, or what a good solution could be. An example was going to http://mysite.com/myDB/mytable/list , when there was an error in a dependency (a required module hadn't been upgraded properly). I got the error message in my Apache logs, but Maypole skipped the authentication step, and skipped the pager, returning the full result set at once. The navbar also displayed with _all_ tables, not just the display tables, making my sessions table visible, for example. Needless to say, if there's an error like this I'd prefer to display an error page, or at least have the application die utterly with an Internal Server Error, rather than spewing out my entire database and all the tables to any unauthenticated user. Anyone else see anything like this? Jesse Sheidlower From simon@simon-cozens.org Thu Aug 5 10:59:57 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Thu, 5 Aug 2004 10:59:57 +0100 Subject: [Maypole] Re: problems with BeerDB In-Reply-To: <5fb1700040801093738458c2e@mail.gmail.com> References: <5fb170004073113052467fc5e@mail.gmail.com> <5fb1700040801093738458c2e@mail.gmail.com> Message-ID: <20040805095957.GA7541@alibi.simon-cozens.org> Michael Freeman: > I am trying to customize the BeerDB application and I added a bunch of fields to > the database like a binary picture column and things like that. How do > I customize the 'view' template to only display a few columns in each > row? Um. You write a view template which says what you want it to say. Which bit of this are you having problems with? -- "The elder gods went to Suggoth and all I got was this lousy T-shirt." From simon@simon-cozens.org Thu Aug 5 11:01:31 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Thu, 5 Aug 2004 11:01:31 +0100 Subject: [Maypole] multiple Maypole applications In-Reply-To: <410D0BCE.13524.4D8616FF@localhost> References: <410D0BCE.13524.4D8616FF@localhost> Message-ID: <20040805100131.GB7541@alibi.simon-cozens.org> David R. Baird: > So I tried adding a second Maypole application to my site, after > getting the BeerDB thing up and running, but the config of the second > application overwrites the first. The patch below fixes that, and > everything seems to work fine. Applied, thanks. (Although I'm apt to miss patches on maypole@; maypole-dev@ is the best place for them.) -- * Progress (n.): The process through which Usenet has evolved from smart people in front of dumb terminals to dumb people in front of smart terminals. -- obs@burnout.demon.co.uk (obscurity) From daniel@coder.com Thu Aug 5 10:52:42 2004 From: daniel@coder.com (Daniel R. Allen) Date: Thu, 5 Aug 2004 05:52:42 -0400 (EDT) Subject: [Maypole] /beerdb only shows directory listing Message-ID: Hi all, I don't have sufficient mod_perl-fu to figure this out on my own. I followed the cookbook examples from http://maypole.simon-cozens.org/doc/beerdb.html and http://wiki.simon-cozens.org/index.cgi?InstallationIssues however, /beerdb on my server shows a directory listing. I'm using: maypole 1.7; debian stable apache/mod_perl; and fresh module installs from CPAN of other required modules. My apache.conf has: ### maypole test ### use lib '/home/user/beerdb/lib'; SetHandler perl-script PerlHandler BeerDB /home/user/beerdb/lib/BeerDB has: package BeerDB; use base 'Apache::MVC'; BeerDB->setup("dbi:SQLite:/usr/local/src/cpan/build/Maypole-1.7/t/beerdb.db"); BeerDB->config->{uri_base} = "http://domain.com:1081/beerdb/"; BeerDB->config->{rows_per_page} = 10; BeerDB->config->{display_tables} = [qw[beer brewery pub style]]; BeerDB::Brewery->untaint_columns( printable => [qw/name notes url/] ); BeerDB::Style->untaint_columns( printable => [qw/name notes/] ); BeerDB::Beer->untaint_columns( printable => [qw/abv name price notes/], integer => [qw/style brewery score/], date => [ qw/date/], ); use Class::DBI::Loader::Relationship; BeerDB->config->{loader}->relationship($_) for ( "a brewery produces beers", "a style defines beers", "a pub has beers on handpumps"); 1; mod_perl is running; a simple http://domain.com:1081/perl/test.pl gives me a proper output (tested with httpd -X). perl Maypole-1.7/t/1.t runs with no errors. http://domain.com:1081/beerdb/ gives me a directory listing. I can go down into the beer and custom subdirectories, and selecting any of the scripts displays the source in the browser. % HEAD http://domain.com:1081 200 OK Connection: close Date: Thu, 05 Aug 2004 09:30:43 GMT Accept-Ranges: bytes ETag: "411c8-10a7-3f74a6a8" Server: Apache/1.3.26 (Unix) Debian GNU/Linux mod_perl/1.26 Content-Length: 4263 Content-Type: text/html; charset=iso-8859-1 Last-Modified: Fri, 26 Sep 2003 20:50:48 GMT Client-Date: Thu, 05 Aug 2004 09:30:43 GMT Client-Peer: 127.0.0.1:1081 Client-Response-Num: 1 The httpd error logs don't show any errors when I visit /beer in the browser, either via regular apache or single-child httpd -X. When I try to visit of the scripts such as /beerdb/beer/addnew I see the text of the script in the browser, and the error log gets: file error - beeraddnew: not found at /usr/local/share/perl/5.6.1/Maypole/View/Base.pm line 68. SQLite is running; I was able to use: dbish dbi:SQLite:/usr/local/src/cpan/build/Maypole-1.7/t/beerdb.db to browse the beer database. I'm using SQLite 0.36. Any ideas what I should check next? Thanks, -Daniel -- http://kw.pm.org/ - Kitchener-Waterloo Perl Mongers - da@kw.pm.org http://coder.com/ - Prescient Code Solutions - (519) 575-3733 da@coder.com From simon@simon-cozens.org Thu Aug 5 11:07:01 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Thu, 5 Aug 2004 11:07:01 +0100 Subject: [Maypole] /beerdb only shows directory listing In-Reply-To: References: Message-ID: <20040805100701.GA7802@alibi.simon-cozens.org> Daniel R. Allen: > When I try to visit of the scripts such as /beerdb/beer/addnew > I see the text of the script in the browser, and the error log gets: > file error - beeraddnew: not found at /usr/local/share/perl/5.6.1/Maypole/View/Base.pm line 68. This is a good sign, it shows that Maypole is actually being used; I'd next look at putting a 'sub debug { 1 }' inside your BeerDB.pm and see where it gets you. -- Thermodynamics in a nutshell: 1st Law: You can't win. (Energy is conserved) 2nd Law: You can't break even. (Entropy) 0th Law: You can't even quit the game. (Closed systems) -- Taki Kogoma From daniel@coder.com Thu Aug 5 11:26:49 2004 From: daniel@coder.com (Daniel R. Allen) Date: Thu, 5 Aug 2004 06:26:49 -0400 (EDT) Subject: [Maypole] Re:/beerdb only shows directory listing Message-ID: Done. When I visit beerdb/beer/addnew, the error log now shows: We don't have that action (addnew) at /usr/local/share/perl/5.6.1/Maypole.pm line 100. file error - beeraddnew: not found at /usr/local/share/perl/5.6.1/Maypole/View/Base.pm line 68. -- http://kw.pm.org/ - Kitchener-Waterloo Perl Mongers - da@kw.pm.org http://coder.com/ - Prescient Code Solutions - (519) 575-3733 da@coder.com Simon Cozens said: > Daniel R. Allen: > > When I try to visit of the scripts such as /beerdb/beer/addnew > > I see the text of the script in the browser, and the error log gets: > > file error - beeraddnew: not found at /usr/local/share/perl/5.6.1/Maypole/View/Base.pm line 68. > > This is a good sign, it shows that Maypole is actually being used; I'd next > look at putting a 'sub debug { 1 }' inside your BeerDB.pm and see where it > gets you. > > -- > Thermodynamics in a nutshell: > 1st Law: You can't win. (Energy is conserved) > 2nd Law: You can't break even. (Entropy) > 0th Law: You can't even quit the game. (Closed systems) -- Taki Kogoma From simon@simon-cozens.org Thu Aug 5 11:32:52 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Thu, 5 Aug 2004 11:32:52 +0100 Subject: [Maypole] Re:/beerdb only shows directory listing In-Reply-To: References: Message-ID: <20040805103252.GA10504@alibi.simon-cozens.org> Daniel R. Allen: > Done. When I visit beerdb/beer/addnew, the error log now shows: > > We don't have that action (addnew) at /usr/local/share/perl/5.6.1/Maypole.pm line 100. > file error - beeraddnew: not found at /usr/local/share/perl/5.6.1/Maypole/View/Base.pm line 68. Well, um, that would be because addnew isn't an action. Try /beerdb/beer/list instead and see what that gives you. -- I want you to know that I create nice things like this because it pleases the Author of my story. If this bothers you, then your notion of Authorship needs some revision. But you can use perl anyway. :-) - Larry Wall From daniel@coder.com Thu Aug 5 11:50:42 2004 From: daniel@coder.com (Daniel R. Allen) Date: Thu, 5 Aug 2004 06:50:42 -0400 (EDT) Subject: [Maypole] Re:/beerdb only shows directory listing In-Reply-To: <20040805103252.GA10504@alibi.simon-cozens.org> Message-ID: Well that makes sense, I suppose... but: /beerdb/beer/list doesn't exist. There's only /beerdb/beer/addnew in that directory. /beerdb/factory/list does exist; it gives me: We don't have that table (factory) at /usr/local/share/perl/5.6.1/Maypole.pm line 94. file error - factorylist: not found at /usr/local/share/perl/5.6.1/Maypole/View/Base.pm line 68. (why do I get the feeling you're going to tell me that's because there isn't a 'factory' table?...) -- http://kw.pm.org/ - Kitchener-Waterloo Perl Mongers - da@kw.pm.org http://coder.com/ - Prescient Code Solutions - (519) 575-3733 da@coder.com On Thu, 5 Aug 2004, Simon Cozens wrote: > Well, um, that would be because addnew isn't an action. Try /beerdb/beer/list > instead and see what that gives you. > > -- > I want you to know that I create nice things like this because it > pleases the Author of my story. If this bothers you, then your notion > of Authorship needs some revision. But you can use perl anyway. :-) > - Larry Wall > > _______________________________________________ > maypole mailing list > maypole@lists.netthink.co.uk > http://lists.netthink.co.uk/listinfo/maypole > From simon@simon-cozens.org Thu Aug 5 12:12:07 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Thu, 5 Aug 2004 12:12:07 +0100 Subject: [Maypole] Re:/beerdb only shows directory listing In-Reply-To: References: <20040805103252.GA10504@alibi.simon-cozens.org> Message-ID: <20040805111207.GB10504@alibi.simon-cozens.org> Daniel R. Allen: > (why do I get the feeling you're going to tell me that's because there > isn't a 'factory' table?...) Trust Maypole. Maypole is right. It can't find the factory table because there isn't one. This isn't an invitation to create one. :) Really, when I said try going to /beerdb/beer/list, I meant going there. I know damned well there isn't a beer/list file. I wrote this, remember? As explained in http://maypole.simon-cozens.org/doc/View.html, factory is a directory used to contain templates that Maypole should look in as a last resort - or, to put it the other way around, factory is the default set of templates that can be customized by table-specific ones. Maypole looks for beer/list to do a list on the beer table, and if it can't find one, looks in custom/list, and then looks in factory/list. I think the key here is to dissociate your concept of a URL as referring to something in the filesystem. It doesn't any more. A Maypole URL is a table and an action and some parameters. /beerdb/beer/list means to take the beer table and execute the list action on it, getting a template from somewhere. I've just finished a very crazy hack in one Maypole application that means that the templates aren't in the filesystem at all. Ignore the damned filesystem. -- Resist the urge to start typing; thinking is a worthwhile alternative. -- Kernighan and Pike From daniel@coder.com Thu Aug 5 12:14:46 2004 From: daniel@coder.com (Daniel R. Allen) Date: Thu, 5 Aug 2004 07:14:46 -0400 (EDT) Subject: [Maypole] Re:/beerdb only shows directory listing In-Reply-To: Message-ID: I should've followed that instruction more closely. When I visit the URL /beerdb/beer/list, I get a nice pretty page. It lists a beer. The URLs on that page don't look right; the first one is: /beerdbbeer/list/ I sense progress. Time for a beer. -- http://kw.pm.org/ - Kitchener-Waterloo Perl Mongers - da@kw.pm.org http://coder.com/ - Prescient Code Solutions - (519) 575-3733 da@coder.com On Thu, 5 Aug 2004, Daniel R. Allen wrote: > Well that makes sense, I suppose... but: > > /beerdb/beer/list doesn't exist. There's only /beerdb/beer/addnew in that > directory. /beerdb/factory/list does exist; it gives me: > > We don't have that table (factory) at /usr/local/share/perl/5.6.1/Maypole.pm line 94. > file error - factorylist: not found at /usr/local/share/perl/5.6.1/Maypole/View/Base.pm line 68. > > (why do I get the feeling you're going to tell me that's because there > isn't a 'factory' table?...) > > -- > http://kw.pm.org/ - Kitchener-Waterloo Perl Mongers - da@kw.pm.org > http://coder.com/ - Prescient Code Solutions - (519) 575-3733 da@coder.com > > On Thu, 5 Aug 2004, Simon Cozens wrote: > > > Well, um, that would be because addnew isn't an action. Try /beerdb/beer/list > > instead and see what that gives you. > > > > -- > > I want you to know that I create nice things like this because it > > pleases the Author of my story. If this bothers you, then your notion > > of Authorship needs some revision. But you can use perl anyway. :-) > > - Larry Wall > > > > _______________________________________________ > > maypole mailing list > > maypole@lists.netthink.co.uk > > http://lists.netthink.co.uk/listinfo/maypole > > > > > _______________________________________________ > maypole mailing list > maypole@lists.netthink.co.uk > http://lists.netthink.co.uk/listinfo/maypole > From simon@simon-cozens.org Thu Aug 5 12:17:29 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Thu, 5 Aug 2004 12:17:29 +0100 Subject: [Maypole] Re:/beerdb only shows directory listing In-Reply-To: References: Message-ID: <20040805111729.GA14054@alibi.simon-cozens.org> Daniel R. Allen: > The URLs on that page don't look right; the first one is: > /beerdbbeer/list/ This could be my fault, or it could be because you don't have a trailing slash at the end of uri_base. I'm not sure. This has been giving me nightmares since Maypole 0.1. -- Mohandas K. Gandhi often changed his mind publicly. An aide once asked him how he could so freely contradict this week what he had said just last week. The great man replied that it was because this week he knew better. From daniel@coder.com Thu Aug 5 12:40:15 2004 From: daniel@coder.com (Daniel R. Allen) Date: Thu, 5 Aug 2004 07:40:15 -0400 (EDT) Subject: [Maypole] Re:/beerdb only shows directory listing In-Reply-To: <20040805111729.GA14054@alibi.simon-cozens.org> Message-ID: Nope, uri_base has a trailing slash. As far as diagnosing why the front page doesn't show up, I tried a .htacess "Options -Index", which merely causes a Forbidden error. Browsing the pages doesn't create any debugging messages. I've also re-checked that all of the modules I installed from CPAN to make this work (all 44 of them) passed their tests. -- "Use a different web browser. There are a number of significant vulnerabilit- ies in technologies relating to the [Microsoft] IE domain/zone security model, the DHTML object model, MIME type determination, and ActiveX." - US CERT (US Computer Emergency Readiness Team) - http://www.kb.cert.org/vuls/id/713878 On Thu, 5 Aug 2004, Simon Cozens wrote: > Daniel R. Allen: > > The URLs on that page don't look right; the first one is: > > /beerdbbeer/list/ > > This could be my fault, or it could be because you don't have a trailing slash > at the end of uri_base. I'm not sure. This has been giving me nightmares since > Maypole 0.1. From simon@simon-cozens.org Thu Aug 5 12:50:21 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Thu, 5 Aug 2004 12:50:21 +0100 Subject: [Maypole] Re:/beerdb only shows directory listing In-Reply-To: References: <20040805111729.GA14054@alibi.simon-cozens.org> Message-ID: <20040805115021.GA16872@alibi.simon-cozens.org> Daniel R. Allen: > Nope, uri_base has a trailing slash. Mah. Give /beerdb/frontpage a shot? -- "He was a modest, good-humored boy. It was Oxford that made him insufferable." From daniel@coder.com Thu Aug 5 13:29:25 2004 From: daniel@coder.com (Daniel R. Allen) Date: Thu, 5 Aug 2004 08:29:25 -0400 (EDT) Subject: [Maypole] Re:/beerdb only shows directory listing In-Reply-To: <20040805115021.GA16872@alibi.simon-cozens.org> Message-ID: /beerdb/frontpage loads; on loading it the error log reports: We don't have that table (frontpage) at /usr/local/share/perl/5.6.1/Maypole.pm line 94. oddly, when the front page is loaded without a trailing slash, it has the proper links to the database pages; with the slash, it tries to go to /beerdb/frontpage/beer/list . -- "Use a different web browser. There are a number of significant vulnerabilit- ies in technologies relating to the [Microsoft] IE domain/zone security model, the DHTML object model, MIME type determination, and ActiveX." - US CERT (US Computer Emergency Readiness Team) - http://www.kb.cert.org/vuls/id/713878 On Thu, 5 Aug 2004, Simon Cozens wrote: > Daniel R. Allen: > > Nope, uri_base has a trailing slash. > > Mah. Give /beerdb/frontpage a shot? From knoebi@gmail.com Thu Aug 5 16:59:58 2004 From: knoebi@gmail.com (knoebi) Date: Thu, 5 Aug 2004 17:59:58 +0200 Subject: [Maypole] some Installation Issues Message-ID: Hi list, impressed from Simons (Thank you!) Articles I finally managed it to install Maypole today, and most of the beerdb example works. Unfortunaly, I had some issues (and still have some) when I installed Maypole: - I had to edit the macro - link template - I applied the patch for 1.5 for many2many, now I see at least the beers in the pub. But I still can't add a new beer to a pub over the webinterface? does anybody know whats wrong? Sorry, if I mail you with an old problem, but I did not found a solution for this in the documentation, ml-archive or the wiki. If it was correct what I did (patching and macro link) I'am wondering why you don't release a new version (including those 2 fixes)? ciao, Philippp From simon@simon-cozens.org Thu Aug 5 19:04:35 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Thu, 5 Aug 2004 19:04:35 +0100 Subject: [Maypole] some Installation Issues In-Reply-To: References: Message-ID: <20040805180435.GA4043@alibi.simon-cozens.org> knoebi: > But I still can't add a new beer to a pub over the webinterface? does > anybody know whats wrong? Yeah I failed to write that bit of the default templates. > If it was correct what I did (patching and macro link) I'am wondering > why you don't release a new version (including those 2 fixes)? Time. :( And getting confused about which patches are still to go in, and being convinced that they're the right thing anyway. -- There are only two things in the world I can rely on. My own stupidity, and the people offering me viagra in my inbox From sai.nelson.tong@gmail.com Fri Aug 6 08:37:00 2004 From: sai.nelson.tong@gmail.com (Sai Nelson Tong) Date: Fri, 6 Aug 2004 03:37:00 -0400 Subject: [Maypole] Problem with unusual column names Message-ID: <154686c30408060037976131b@mail.gmail.com> I am trying to use Maypole to display data from a table wich unusual column names such as, for examlpe: p-m-abc or o-/m-/2,5 Then Maypole will give the following error when enter the url to 'list' the content of the table: undef error - DBD::mysql::st execute failed: Unknown column 'p' in 'field list' [for Statement "SELECT ......."] at /usr/lib/perl5/site_perl/5.8.3/DBIx/ContextualFetch.pm line 57. I am using mysql to store the data and the column name is intact inside the database. Is there any way to get around this problem without having to do any compromise such as changing the unusual names of the columns in order to allow Maypole to display the data in the table? S. Tong From simon@simon-cozens.org Fri Aug 6 09:13:57 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Fri, 6 Aug 2004 09:13:57 +0100 Subject: [Maypole] Problem with unusual column names In-Reply-To: <154686c30408060037976131b@mail.gmail.com> References: <154686c30408060037976131b@mail.gmail.com> Message-ID: <20040806081357.GA11649@alibi.simon-cozens.org> Sai Nelson Tong: > I am trying to use Maypole to display data from a table wich unusual > column names such as, for examlpe: p-m-abc or o-/m-/2,5 Wow. I didn't even think that was possible. > Then Maypole will give the following error when enter the url to > 'list' the content of the table: > > undef error - DBD::mysql::st execute failed: Unknown column 'p' in > 'field list' [for Statement "SELECT ......."] at > /usr/lib/perl5/site_perl/5.8.3/DBIx/ContextualFetch.pm line 57. That's the Class::DBI bit causing the error, since this is a Class::DBI issue. I have no idea what to do about it; you could try the Class::DBI mailing list. -- Wouldn't you love to fill out that report? "Company asset #423423 was lost while fighting the forces of evil." -- Chris Adams in the scary.devil.monastery From nicg@noslogan.org Fri Aug 6 09:23:42 2004 From: nicg@noslogan.org (Nic Gibson) Date: Fri, 6 Aug 2004 09:23:42 +0100 Subject: [Maypole] Problem with unusual column names In-Reply-To: <154686c30408060037976131b@mail.gmail.com> References: <154686c30408060037976131b@mail.gmail.com> Message-ID: On 6 Aug 2004, at 08:37, Sai Nelson Tong wrote: > I am trying to use Maypole to display data from a table wich unusual > column names such as, for examlpe: p-m-abc or o-/m-/2,5 This is, sadly, not a problem with Maypole. It might be considered to be a problem to Class::DBI I suppose but... basically this is due to your column names being 'nonstandard'. It's fairly hard to deal with this in a consistent way since the quoting and escaping of 'odd' column names is very much non-standard. The appropriate part of the mysql manual is: http://dev.mysql.com/doc/mysql/en/Legal_names.html Basically your column name is being interpreted as "p minus - m minus abc". I'd suggest taking this to the Class::DBI list itself sorry not to be of more help nic > > Then Maypole will give the following error when enter the url to > 'list' the content of the table: > > undef error - DBD::mysql::st execute failed: Unknown column 'p' in > 'field list' [for Statement "SELECT ......."] at > /usr/lib/perl5/site_perl/5.8.3/DBIx/ContextualFetch.pm line 57. > > I am using mysql to store the data and the column name is intact > inside the database. Is there any way to get around this problem > without having to do any compromise such as changing the unusual names > of the columns in order to allow Maypole to display the data in the > table? > > S. Tong > > _______________________________________________ > maypole mailing list > maypole@lists.netthink.co.uk > http://lists.netthink.co.uk/listinfo/maypole From tony@kasei.com Fri Aug 6 09:31:04 2004 From: tony@kasei.com (Tony Bowden) Date: Fri, 6 Aug 2004 09:31:04 +0100 Subject: [Maypole] Problem with unusual column names In-Reply-To: <154686c30408060037976131b@mail.gmail.com> References: <154686c30408060037976131b@mail.gmail.com> Message-ID: <20040806083104.GA15723@soto.kasei.com> On Fri, Aug 06, 2004 at 03:37:00AM -0400, Sai Nelson Tong wrote: > I am using mysql to store the data and the column name is intact > inside the database. Is there any way to get around this problem > without having to do any compromise such as changing the unusual names > of the columns in order to allow Maypole to display the data in the > table? Have a look at the "Changing Your Column Accessor Method Names" section of the Class::DBI docs. Tony From sri@oook.de Fri Aug 6 17:03:44 2004 From: sri@oook.de (Sebastian Riedel) Date: Fri, 06 Aug 2004 18:03:44 +0200 Subject: [Maypole] Maypole Debian Packages Message-ID: <4113ABE0.3090909@oook.de> Hi, I made Debian Packages for Maypole, Rubberband and all the required Modules, that are not yet in unstable. You can grab them from http://files.oook.de/debian/. They are just quick'n dirty made with dh-make-perl, so they don't have correct dependencies and you have to resolve them for yourself. But if you figure that out everything is working fine. :) Cheers, Sebastian From nicg@noslogan.org Sat Aug 7 01:02:30 2004 From: nicg@noslogan.org (Nic Gibson) Date: Sat, 7 Aug 2004 01:02:30 +0100 Subject: [Maypole] Overriding do_edit Message-ID: <131F85CD-E805-11D8-9DA6-000A9574B80C@noslogan.org> I'm having issues overriding the default behaviour of do_edit. Basically, I have a custom version that does a few more things and does some 'stuff' to make error messages more friendly. I have also split out the data classes to separate files because there are lot of them and they all have at least a little bit of custom code. So, all my data classes are derived from a custom model class which defines the new behaviour. I posted about this a couple of weeks back and someone was kind enough to suggest replace the use My::Class statements with My::Class->require in my driver module. I've tried this and it doesn't make any difference. Here's the first few lines of my driver (with complete irrelevances removed). package PMR; use strict; use warnings; BEGIN {PMR->setup('dbi:Pg:dbname=pmr', 'pmr', 'pmr', {AutoCommit => 1});} PMR::Freetext->require; PMR::Person->require; ... PMR->config->{model} = 'PMR::Model'; My custom version of do_edit is in PMR::Model. It doesn't get called. Can anyone see from here what stupid mistake I'm making? More code is available if needed. cheers nic From simon.flack@bbc.co.uk Mon Aug 9 11:24:34 2004 From: simon.flack@bbc.co.uk (Simon Flack) Date: Mon, 9 Aug 2004 11:24:34 +0100 Subject: [Maypole] Overriding do_edit Message-ID: maypole-admin@lists.netthink.co.uk wrote on 07 August 2004 01:03: > I'm having issues overriding the default behaviour of do_edit. [snip] > package PMR; >=20 > use strict; > use warnings; >=20 > BEGIN {PMR->setup('dbi:Pg:dbname=3Dpmr', 'pmr', 'pmr', {AutoCommit =3D>= > 1});} >=20 > PMR::Freetext->require; > PMR::Person->require; >=20 > ... >=20 > PMR->config->{model} =3D 'PMR::Model'; >=20 > My custom version of do_edit is in PMR::Model. It doesn't get called. > Can anyone see from here what stupid mistake I'm making? More code is > available if needed. You need to set your model class before calling setup() on your driver. HTH --simonflk=20 http://www.bbc.co.uk/ - World Wide Wonderland This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system.=20 Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received.=20 Further communication will signify your consent to this. From josenyimi@yahoo.fr Mon Aug 9 12:23:19 2004 From: josenyimi@yahoo.fr (=?iso-8859-1?q?Jos=E9=20Nyimi?=) Date: Mon, 9 Aug 2004 13:23:19 +0200 (CEST) Subject: [Maypole] JIRA Tracking for Maypole Message-ID: <20040809112319.7272.qmail@web25209.mail.ukl.yahoo.com> --0-1289162097-1092050599=:4781 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hello, I'm a Maypole and Springframework user and I know that JIRA license is free for open source project. http://www.atlassian.com/software/views/opensource-license-request.jsp It would very helpfull to get a JIRA free setup for Maypole like it's already the case for many popular open source projects like: * springframework ( http://opensource.atlassian.com/projects/spring/secure/Dashboard.jspa ) * hibernate ( http://opensource.atlassian.com/projects/hibernate/secure/Dashboard.jspa ) * xdoclet ( http://opensource.atlassian.com/projects/xdoclet/secure/Dashboard.jspa ) * others ( http://www.atlassian.com/software/jira/customers.jsp;jsessionid=JCCGFJDAJEAE ) Regards, José. --------------------------------- Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Créez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis.Téléchargez GRATUITEMENT ici ! --0-1289162097-1092050599=:4781 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit

Hello,

I'm a Maypole and Springframework user and I know that

JIRA license is free for open source project.

http://www.atlassian.com/software/views/opensource-license-request.jsp

It would very helpfull to get a JIRA free setup for Maypole like it's already the case for many popular open source projects like:

* springframework ( http://opensource.atlassian.com/projects/spring/secure/Dashboard.jspa )

* hibernate ( http://opensource.atlassian.com/projects/hibernate/secure/Dashboard.jspa )

* xdoclet ( http://opensource.atlassian.com/projects/xdoclet/secure/Dashboard.jspa )

* others ( http://www.atlassian.com/software/jira/customers.jsp;jsessionid=JCCGFJDAJEAE )

Regards,

José.

 


Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. Téléchargez GRATUITEMENT ici ! --0-1289162097-1092050599=:4781-- From lists-maypole@russell.matbouli.org Mon Aug 9 12:37:20 2004 From: lists-maypole@russell.matbouli.org (Russell Matbouli) Date: Mon, 9 Aug 2004 12:37:20 +0100 Subject: [Maypole] JIRA Tracking for Maypole In-Reply-To: <20040809112319.7272.qmail@web25209.mail.ukl.yahoo.com> References: <20040809112319.7272.qmail@web25209.mail.ukl.yahoo.com> Message-ID: <20040809113720.GA24248@futureless.org> --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Jos=C3=A9, On Mon, Aug 09, 2004 at 01:23:19PM +0200, Jos=C3=A9 Nyimi wrote: > I'm a Maypole and Springframework user and I know that > JIRA license is free for open source project. The buglist is here: http://rt.cpan.org/NoAuth/Bugs.html?Dist=3DMaypole You can get the buglist for any CPAN project via rt.cpan.org. --=20 Russell Matbouli | The only difference between good and evil russell@futureless.org | is the seating arrangements PGP KeyID: 0x3CA84CF4 | --k+w/mQv8wyuph6w0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBF2HwdMkNGzyoTPQRAqaFAKDAjCZEZ2Y/Rvoo+2RxYPjPCcSxfQCeNQj3 PoKb97LqFu5DAY1e/5tJrhk= =5jQ9 -----END PGP SIGNATURE----- --k+w/mQv8wyuph6w0-- From dennis@sutch.com Mon Aug 9 15:47:51 2004 From: dennis@sutch.com (Dennis Sutch) Date: Mon, 9 Aug 2004 10:47:51 -0400 Subject: [Maypole] CGI::Maypole problems Message-ID: A couple of quesitons: Has anyone been successful in getting a CGI::Maypole site to work? If so, using what version of Maypole and what CGI::Maypole->config->{uri_base} and what IADB->config->{template_root}? I'm having some difficulties with CGI::Maypole and Maypole::View::TT. My uri_base is /cgi-bin/iadb.cgi. Template::Toolkit is being passed a name of cgi-binaidb.cgi as the name of the template file. Any hints will be appreciated. -- "Thanks to the crew of rocketscientists.ca for the gmail invitation!" http://www.rocketscientists.ca/ From ben@btucker.net Mon Aug 9 22:01:36 2004 From: ben@btucker.net (Benjamin Tucker) Date: Mon, 9 Aug 2004 17:01:36 -0400 Subject: [Maypole] Re:/beerdb only shows directory listing In-Reply-To: References: Message-ID: <4D91D609-EA47-11D8-B926-000A95AEF8FA@btucker.net> --Apple-Mail-5--38536049 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On Aug 5, 2004, at 7:14 AM, Daniel R. Allen wrote: > The URLs on that page don't look right; the first one is: > /beerdbbeer/list/ Yeah, I ran into this as well. see the following post for the fix: http://lists.netthink.co.uk/pipermail/maypole/2004-July/000489.html Ben --Apple-Mail-5--38536049 Content-Transfer-Encoding: base64 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Disposition: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 10 10:47:12 2004 From: sri@oook.de (Sebastian Riedel) Date: Tue, 10 Aug 2004 11:47:12 +0200 Subject: [Maypole] Maypole::Authentication::UserSessionCookie, sessionid in path Message-ID: <411899A0.2080002@oook.de> Hi, I would like to have the sessionid as part of the path, it works fine thanks to the ability to overload parse_path, but now i have a problem. There seems no way to make this parsed sessionid available to Maypole::Authentication::UserSessionCookie. Ok, i can modify Maypole::Authentication::UserSessionCookie, but i can't believe Simon forgot to implement something for this. :) So, is there a right-way(tm) to do it? Cheers, Sebastian From sri@oook.de Tue Aug 10 11:07:13 2004 From: sri@oook.de (Sebastian Riedel) Date: Tue, 10 Aug 2004 12:07:13 +0200 Subject: [Maypole] Reference about internal data structures Message-ID: <41189E51.9000504@oook.de> Hi, And a second request. :) I'm missing a simple reference about the internal data structures, you know, where to put which data, which functions to overload... All the infos are well distributed over the documentation, but it would be very nice to have a reference in one place, say Maypole.pm. Cheers, Sebastian From sri@oook.de Wed Aug 11 21:25:34 2004 From: sri@oook.de (Sebastian Riedel) Date: Wed, 11 Aug 2004 22:25:34 +0200 Subject: [Maypole] Announce: Maypole::Authentication::Abstract Message-ID: <411A80BE.1080207@oook.de> Hi, Well, it seems Simon is on a vacation, so i had to help myself. :) The result is Maypole::Authentication::Abstract, maybe it's useful for you too. Just uploaded it to CPAN, should hit a mirror near you soon. Cheers, Sebastian From veljko@spymac.com Mon Aug 9 19:04:20 2004 From: veljko@spymac.com (veljko@spymac.com) Date: Mon, 09 Aug 2004 12:04:20 -0600 Subject: [Maypole] Why require fails? Message-ID: <20040809180423.1E00E380B2@spy23.spymac.net> Hi, all Can someone please explain me why require on the bottom fails and warn returns correct name of the table (image)? Question comes after not being able to use authentication, since UserSessionCookie.pm has : $user_class->require || die "Couldn't load user class $user_class"; which fails and $user_class does exist. Regards, Veljko package Vds; use base qw(Apache::MVC Maypole::Authentication::UserSessionCookie); use Class::DBI::Loader::Relationship; Vds->setup("dbi:mysql:vds", vdsuser); Vds->config->{uri_base} =3D 'http://metatest/vds/'; Vds->config->{auth}{cookie_name} =3D "vds_login123"; Vds->config->{rows_per_page} =3D 10; Vds->config->{display_tables} =3D [qw[doc image]]; Vds::Image->untaint_columns( printable =3D> [qw/name path/] ); Vds::Doc->untaint_columns( printable =3D> [qw/name title version revision/], date =3D>[ qw/date/] ); Vds->config->{loader}->relationship($_) for ( "a doc has images" ); Vds::Image->require || warn $UNIVERSAL::require::ERROR; warn Vds::Image->table(); ---- Introducing Spymac MailPro: http://www.spymac.com/mailpro/ From jim@xcf.berkeley.edu Sat Aug 14 20:06:56 2004 From: jim@xcf.berkeley.edu (Jim Blomo) Date: Sat, 14 Aug 2004 12:06:56 -0700 Subject: [Maypole] table constraints and ContextualFetch.pm Message-ID: <20040814190656.GA43483@scam.XCF.Berkeley.EDU> --FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, I'm using Maypole with postgres 7.4. So far its working great with the beer example. I've added some of my own tables, specifically one with the Foreign-key constraint: "$1" FOREIGN KEY (category) REFERENCES category(id). When I try to use the do_edit method, though, I get the failure: DBD::Pg::st execute failed: ERROR: insert or update on table "example" violates foreign key constraint "$1" [for Statement "INSERT INTO example (email, summary, worth, id, description) VALUES (?, ?, ?, ?, ?) "] at /usr/local/lib/perl5/site_perl/5.8.5/DBIx/ContextualFetch.pm line 51. [Sat Aug 14 18:53:06 2004] [error] Can't insert new Hookups::Hookup: DBD::Pg::st execute failed: ERROR: insert or update on table "example" violates foreign key constraint "$1" [for Statement "INSERT INTO example (email, summary, worth, id, description)\nVALUES (?, ?, ?, ?, ?)\n"] at /usr/local/lib/perl5/site_perl/5.8.5/DBIx/ContextualFetch.pm line 51.\n at /usr/local/lib/perl5/site_perl/5.8.5/Class/DBI/FromCGI.pm line 246\n I have this relationship specified in the BeerDB class: 'a category has examples'. The row is being displayed correctly as a drop down lists with options from the category table. Is the update of a row a two step process? Is there a way to keep constraints specified in postgres as well as Maypole? Thanks, Jim --FCuugMFkClbJLl1L Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQFBHmLQAeSVs8eUE7kRApZNAJ9/7oqKzprJ4+FJ8KbQRi2S/XSahACeOBZ9 PK8xJmHlZLBi5ekSJNXYlY4= =9sSy -----END PGP SIGNATURE----- --FCuugMFkClbJLl1L-- From jim@xcf.berkeley.edu Sat Aug 14 20:30:45 2004 From: jim@xcf.berkeley.edu (Jim Blomo) Date: Sat, 14 Aug 2004 12:30:45 -0700 Subject: [Maypole] Re: table constraints and ContextualFetch.pm In-Reply-To: <20040814190656.GA43483@scam.XCF.Berkeley.EDU> References: <20040814190656.GA43483@scam.XCF.Berkeley.EDU> Message-ID: <20040814193045.GB43483@scam.XCF.Berkeley.EDU> --7iMSBzlTiPOCCT2k Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Aug 14, 2004 at 12:06:56PM -0700, Jim Blomo wrote: > DBD::Pg::st execute failed: ERROR: insert or update on table "example" violates > foreign key constraint "$1" [for Statement "INSERT INTO example (email, summary, > worth, id, description) Very sorry, I found the probelm: I did not set any untaint information for this column in example. Jim --7iMSBzlTiPOCCT2k Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQFBHmhlAeSVs8eUE7kRAhUEAJ9f/6PENzEigaLhe1Rn072NLaOLygCdHS0f Er0rfBIuNp9q7Hc5JebddqQ= =2KYz -----END PGP SIGNATURE----- --7iMSBzlTiPOCCT2k-- From simon@simon-cozens.org Mon Aug 16 23:50:30 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Mon, 16 Aug 2004 23:50:30 +0100 Subject: [Maypole] multiple Maypole applications In-Reply-To: <20040805100131.GB7541@alibi.simon-cozens.org> References: <410D0BCE.13524.4D8616FF@localhost> <20040805100131.GB7541@alibi.simon-cozens.org> Message-ID: <20040816225030.GA29545@alibi.simon-cozens.org> Simon Cozens: > Applied, thanks. (Although I'm apt to miss patches on maypole@; maypole-dev@ > is the best place for them.) Deapplied - this patch stops you being able to set the model class before calling setup, which is important for things which don't use the normal model. -- Putting a square peg into a round hole can be worthwhile if you don't mind a few shavings. -- Larry Wall From jim@rescomp.berkeley.edu Tue Aug 17 07:56:48 2004 From: jim@rescomp.berkeley.edu (Jim Blomo) Date: Mon, 16 Aug 2004 23:56:48 -0700 Subject: [Maypole] [PATCH] default local untaint handlers Message-ID: <20040817065648.GB11549@rescomp.berkeley.edu> This patch gets Maypole to recognize any local extraction handlers you have written for your application. For example, you could now do package BeerDB::CGI::Untaint::color; sub _untaint_re { qr/^([a-z])$/ } sub is_valid { my $color = shift->value; for (qw(gold white brown black red)) { return 1 if $_ eq $color; } } Then start using this handler for a 'color' column on the beer table just like you do for printable, integer, etc. Jim --- Apache-MVC/lib/Maypole/Model/CDBI.pm Mon Jun 21 06:30:51 2004 +++ CDBI.pm Mon Aug 16 23:40:39 2004 @@ -31,7 +31,7 @@ sub do_edit :Exported { my ($self, $r) = @_; - my $h = CGI::Untaint->new(%{$r->{params}}); + my $h = CGI::Untaint->new({ INCLUDE_PATH => ref $r}, %{$r->{params}}); my $creating = 0; my ($obj) = @{$r->objects || []}; if ($obj) { From sri@oook.de Wed Aug 18 00:19:40 2004 From: sri@oook.de (Sebastian Riedel) Date: Wed, 18 Aug 2004 01:19:40 +0200 Subject: [Maypole] Why require fails? In-Reply-To: <20040809180423.1E00E380B2@spy23.spymac.net> References: <20040809180423.1E00E380B2@spy23.spymac.net> Message-ID: <4122928C.5080702@oook.de> Hi, veljko@spymac.com wrote: >Hi, all > >Can someone please explain me why require on the bottom fails and >warn returns correct name of the table (image)? > >Question comes after not being able to use authentication, since >UserSessionCookie.pm has : >$user_class->require || die "Couldn't load user class $user_class"; >which fails and $user_class does exist. > > I'm interested in that too. While implementing Maypole::Authentication::Abstract i noticed the same. Why is this working for you simon? >Regards, >Veljko > >package Vds; >use base qw(Apache::MVC Maypole::Authentication::UserSessionCookie); >use Class::DBI::Loader::Relationship; > >Vds->setup("dbi:mysql:vds", vdsuser); >Vds->config->{uri_base} = 'http://metatest/vds/'; > >Vds->config->{auth}{cookie_name} = "vds_login123"; >Vds->config->{rows_per_page} = 10; > >Vds->config->{display_tables} = [qw[doc image]]; >Vds::Image->untaint_columns( printable => [qw/name path/] ); >Vds::Doc->untaint_columns( > printable => [qw/name title version revision/], > date =>[ qw/date/] >); > >Vds->config->{loader}->relationship($_) for ( > "a doc has images" >); > >Vds::Image->require || warn $UNIVERSAL::require::ERROR; >warn Vds::Image->table(); > > >---- Introducing Spymac MailPro: http://www.spymac.com/mailpro/ > >_______________________________________________ >maypole mailing list >maypole@lists.netthink.co.uk >http://lists.netthink.co.uk/listinfo/maypole > > > Cheers, Sebastian From simon@simon-cozens.org Wed Aug 18 00:49:19 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Wed, 18 Aug 2004 00:49:19 +0100 Subject: [Maypole] Why require fails? In-Reply-To: <20040809180423.1E00E380B2@spy23.spymac.net> References: <20040809180423.1E00E380B2@spy23.spymac.net> Message-ID: <20040817234919.GB27298@alibi.simon-cozens.org> veljko@spymac.com: > Can someone please explain me why require on the bottom fails and > warn returns correct name of the table (image)? Don't know if this answers the question, but the "image" table doesn't look like it's going to hold username and password fields, to me. I don't think that's the right value for the user class. -- Reporter (to Mahatma Gandhi): Mr Gandhi, what do you think of Western Civilization? Gandhi: I think it would be a good idea. From sri@oook.de Wed Aug 18 09:58:51 2004 From: sri@oook.de (Sebastian Riedel) Date: Wed, 18 Aug 2004 10:58:51 +0200 Subject: [Maypole] Why require fails? In-Reply-To: <20040817234919.GB27298@alibi.simon-cozens.org> References: <20040809180423.1E00E380B2@spy23.spymac.net> <20040817234919.GB27298@alibi.simon-cozens.org> Message-ID: <41231A4B.30109@oook.de> Simon Cozens wrote: >veljko@spymac.com: > > >>Can someone please explain me why require on the bottom fails and >>warn returns correct name of the table (image)? >> >> > >Don't know if this answers the question, but the "image" table doesn't look >like it's going to hold username and password fields, to me. I don't think >that's the right value for the user class. > > > I can't answer for Veljko, but here everything worked flawless as soon as i removed || die "Couldn't load xxx class $xxx_class" from all $xxx_class->require calls. They always return 0, even if table and class are perfect. Cheers, Sebastian From brian@glassbrian.com Wed Aug 18 14:32:29 2004 From: brian@glassbrian.com (Brian Glass) Date: Wed, 18 Aug 2004 09:32:29 -0400 Subject: [Maypole] SOAP or XML::RPC Message-ID: <41235A6D.60501@glassbrian.com> I'm a relative Maypole newbie and I'm trying to plan for the future. I know that in the future I would like to be able to make calls to my application from Mambo CMS (PHP based) via SOAP or XML::RPC. I want to make sure that what I am putting together right now will be able to grow into that with ease. And in fact, it has been hinted at on the Maypole site that a SOAP interface may eventually appear. In a Maypole view class I am able to call methods which are automatically created by has_a or has_many relationships. e.g.: [% item.address.city %] In this example the "item" (assume it's a person) has_a address which has a city. In reality Class::DBI is going to do all the work here and make some SQL queries on our database and return the information - all transparent for me. If this was done with SOAP what would happen? The Template Toolkit and/or Mason (which is actually what I'm using) is relatively tightly coupled to the model class. If I was making a remote procedure call what would happen? Would the "address" method of the "item" object automatically make a SOAP call to the backend? And if it did, would all the automatically generated methods be :Exported? Or would the entire object including has_a relationships (with possibly circular references) be serialized and sent over the wire? Would it be a good idea to package up all needed information into a simplified object to be serialized right in my model class, or should I keep making calls like the above example? Does that make any sense at all? From veljko.vidovic@canadair.ca Wed Aug 18 20:50:46 2004 From: veljko.vidovic@canadair.ca (Veljko Vidovic) Date: Wed, 18 Aug 2004 15:50:46 -0400 Subject: [Maypole] Why require fails? Message-ID: <001701c4855c$a7b1cf70$1d1213ac@dyn.cit.canadair.ca> Hi, Sebastian, Simon > Don't know if this answers the question, but the "image" table doesn't look > like it's going to hold username and password fields, to me. I don't think > that's the right value for the user class. I am so sorry, I made mistake saying it returns image 'table'. What I've meant was that it returns 'user' table. In that time I was making tests with other tables and that's why I've put 'image' there. So, I am giving it another try: Is it possible that namespace::classname->require returns true if namespace/classname file does not exist? It looks to me answer is no, so it means that Maypole::Authentication::UserSessionCookie will die on $user_class->require || die "Couldn't load user class $user_class"; unless namspace/User.pm or whatever user_class is, exists. Should this be considered as bug? Regards, Veljko From jim@rescomp.berkeley.edu Sun Aug 22 02:49:40 2004 From: jim@rescomp.berkeley.edu (Jim Blomo) Date: Sat, 21 Aug 2004 18:49:40 -0700 Subject: [Maypole] deep recursion on do_edit Message-ID: <20040822014940.GB11945@rescomp.berkeley.edu> Hi, I'm getting errors when trying to add a new object to my username table. However, the error messages are inconsistant, and I suspect only get printed to the log when there's enough memory around. They are usually one or more of the following: Deep recursion on subroutine "Class::DBI::get" at /usr/local/lib/perl5/site_perl/5.8.5/Class/Accessor.pm line 350. Deep recursion on subroutine "Class::DBI::_flesh" at /usr/local/lib/perl5/site_perl/5.8.5/Class/DBI.pm line 84 0. Deep recursion on anonymous subroutine at /usr/local/lib/perl5/site_perl/5.8.5/Class/DBI.pm line 852. -or- [Sun Aug 22 00:23:06 2004] [error] Out of memory during "large" request for 134221824 bytes, total sbrk() is 4 09249792 bytes at /usr/local/lib/perl5/site_perl/5.8.5/Class/DBI.pm line 278.\n -or- Out of memory during request for 1012 bytes, total sbrk() is 532396032 bytes! Callback called exit. There is no problem when I create the object manually in the DB or through perl -e 'use Fuzzyowl; $o = Fuzzyowl::Username->create({email =>'admin', username =>'admin',password=>'password'}); print $o;' I'm using the factory templates to manipulate the data, and the only customization to the class has been putting in its relationship to UserType and adding sub stringify_self { shift->username; }. Table "public.username" Column | Type | Modifiers -------------+-------------------+---------------------------------------------------------- id | integer | not null default nextval('public.username_id_seq'::text) email | character varying | fname | character varying | lname | character varying | username | character varying | not null password | character varying | not null type | integer | not null default 1 Indexes: "username_pkey" primary key, btree (id) Foreign-key constraints: "$3" FOREIGN KEY ("type") REFERENCES user_type(id) Would there be any problems with having a column name equal to the table name? Any pointers on where to look next would be appreciated. Jim From jim@rescomp.berkeley.edu Thu Aug 26 06:26:45 2004 From: jim@rescomp.berkeley.edu (Jim Blomo) Date: Wed, 25 Aug 2004 22:26:45 -0700 Subject: [Maypole] deep recursion on do_edit In-Reply-To: <20040822014940.GB11945@rescomp.berkeley.edu> References: <20040822014940.GB11945@rescomp.berkeley.edu> Message-ID: <20040826052645.GI11945@rescomp.berkeley.edu> On Sat, Aug 21, 2004 at 06:49:40PM -0700, Jim Blomo wrote: > I'm using the factory templates to manipulate the data, and the only > customization to the class has been putting in its relationship to UserType and adding sub stringify_self { shift->username; }. I fixed this by simply using the __PACKAGE__->columns(Stringify => 'username'); but beware using stringify in the future, I guess. Jim From dennis@sutch.com Mon Aug 30 14:17:09 2004 From: dennis@sutch.com (Dennis Sutch) Date: Mon, 30 Aug 2004 09:17:09 -0400 Subject: [Maypole] authorization with Maypole Message-ID: Hi, Has anyone implemented authorization in Maypole? Does anyone have any ideas how to setup authorization such that authorization to individual objects (database records) are restricted to specific users (or users within a group)? Thanks, Dennis -- "Thanks to the crew of rocketscientists.ca for the gmail invitation!" http://www.rocketscientists.ca/ From simon@simon-cozens.org Mon Aug 30 14:33:25 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Mon, 30 Aug 2004 14:33:25 +0100 Subject: [Maypole] authorization with Maypole In-Reply-To: References: Message-ID: <20040830133325.GA1949@alibi.simon-cozens.org> Dennis Sutch: > Has anyone implemented authorization in Maypole? Does anyone have any > ideas how to setup authorization such that authorization to individual > objects (database records) are restricted to specific users (or users > within a group)? Please see http://maypole.simon-cozens.org/doc/authentication.html and the Maypole::Authentication::Abstract and Maypole::Authentication::UserSessionCookie. -- buf[hdr[0]] = 0; /* unbelievably lazy ken (twit) */ - Andrew Hume From jester@panix.com Mon Aug 30 14:34:37 2004 From: jester@panix.com (Jesse Sheidlower) Date: Mon, 30 Aug 2004 09:34:37 -0400 Subject: [Maypole] authorization with Maypole In-Reply-To: References: Message-ID: <20040830133437.GA14138@panix.com> On Mon, Aug 30, 2004 at 09:17:09AM -0400, Dennis Sutch wrote: > Hi, > > Has anyone implemented authorization in Maypole? Does anyone have any > ideas how to setup authorization such that authorization to individual > objects (database records) are restricted to specific users (or users > within a group)? I have a 'user' table that has an 'access_level' column. I do authentication generally as set up in Maypole::Authentication::UserSessionCookie, so after logging in, $r->{user} is populated with a User object, which will contain the access_level for a given user. Then I can test for things in my templates as needed. For example, if I want to set editing access for a particular table to "5", I'll add to the relevant package something like MyDB->config->{library}{edit_access_level} = 5; and then I can have a template like [% IF request.user.access_level >= request.config.library.edit_access_level %] [% button(item, "edit") %] [% END %] Or something like that. I don't know what you want to do to restrict users to _specific_ individual records, if that's what you mean, but if you can test for something, yo ucan set it up more or less as above. HTH. Jesse Sheidlower From josenyimi@yahoo.fr Mon Aug 30 15:20:00 2004 From: josenyimi@yahoo.fr (=?iso-8859-1?q?Jos=FFffffe9=20Nyimi?=) Date: Mon, 30 Aug 2004 16:20:00 +0200 (CEST) Subject: [Maypole] Maypole on Windows Message-ID: <20040830142000.29279.qmail@web86909.mail.ukl.yahoo.com> --0-861212431-1093875600=:29060 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hello, Is out there anyone using Maypole on Windows ? I see from http://maypole.simon-cozens.org/doc/About.html the Author said: "I don't know if Maypole works on Windows. I'm not sure I care". So, I would like to have some advices before I start getting in windows' troubles. Thanks in advance, José. --------------------------------- Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Créez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis.Téléchargez GRATUITEMENT ici ! --0-861212431-1093875600=:29060 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hello,
 
Is out there anyone using Maypole on Windows ?
I see from
the Author said: "I don't know if Maypole works on Windows. I'm not sure I care".
 
So, I would like to have some advices before I start getting in windows' troubles.
 
Thanks in advance,
 
José.
 
 


Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. Téléchargez GRATUITEMENT ici ! --0-861212431-1093875600=:29060-- From simon@simon-cozens.org Mon Aug 30 15:41:20 2004 From: simon@simon-cozens.org (Simon Cozens) Date: Mon, 30 Aug 2004 15:41:20 +0100 Subject: [Maypole] Maypole on Windows In-Reply-To: <20040830142000.29279.qmail@web86909.mail.ukl.yahoo.com> References: <20040830142000.29279.qmail@web86909.mail.ukl.yahoo.com> Message-ID: <20040830144120.GA7063@alibi.simon-cozens.org> Jos?ffffe9 Nyimi: > the Author said: "I don't know if Maypole works on Windows. I'm not sure I care". Unfortunately, I have to start caring soon. :) I'm putting together a Windows application which uses Maypole as its back-end, so you can be sure that in the next few weeks, if there are any Windows-related fixes, they'll be made to CVS. -- "You can have my Unix system when you pry it from my cold, dead fingers." From jester@panix.com Tue Aug 31 21:10:40 2004 From: jester@panix.com (Jesse Sheidlower) Date: Tue, 31 Aug 2004 16:10:40 -0400 Subject: [Maypole] Using custom TT filters/plugins from Maypole? Message-ID: <20040831201040.GA17290@panix.com> Perhaps this is entirely a Template Toolkit question. I'd like to use custom filters and/or plugins from within a Maypole application. However, there's no way to specify these in Maypole::View::TT. Is there another way to declare these such that Maypole can find them? Or would it make sense to extend Maypole::View::TT so that the Template->new call will look for filters/plugins in a Maypole configuration file? Or is there some other way of doing this? Thanks. Jesse Sheidlower