David Baird | 24 May 2005 16:39
Picon

[ANNOUNCE] Maypole::Virtual::Application

I've just uploaded this to CPAN. I stayed with the singular name, because I 
couldn't resist the symmetry with Mp::App. 

Note that to get this to work, you need to fix Maypole::Application first. The 
bugs are described in rt.cpan.org, and you can download a fixed version from 
beerdb.riverside-cms.co.uk.

Does anyone have any idea of when a new release is likely? MasonX::Maypole 
also needs some fixes to Mp::App (which are also in the 
beerdb.riverside-cms.co.uk version). 

d.
David Baird | 23 May 2005 01:15
Picon

Generating apps on the fly

Following on from recent discussions about building apps for multiple vhosts, 
I've written a module that sets up Maypole apps 'on the fly'. I'd like to 
solicit suggestions for a name for the thing. At the moment, I'm 
provisionally calling it Maypole::Virtual::Application. 

=head1 SYNOPSIS

    package BeerDB;
    use strict;
    use warnings;
    use Class::DBI::Loader::Relationship;
    use Maypole::Virtual::Application; 

    Maypole::Virtual::Application->install_packages( qw( -Debug
                                                          AutoUntaint ) );

    # beer for everyone!
    sub virtual_packages { map { __PACKAGE__ . "::Site$_" } 1 .. 100 }

    sub initialize_package
    {
        my ( $self, $package ) =  <at> _;

        $package =~ /(Site\d+)$/;

        my $site = $1;

        my $username = My::Config::System->get_beerdb_username_for( $site );
        my $password = My::Config::System->get_beerdb_password_for( $site );

(Continue reading)

Joshua Keroes | 15 Apr 2005 19:23

Re: CDBI::AsForm and checkboxes


Thank-you both, Peter and Ian. This is exactly what I'm after.

Cheers,
Joshua

On Apr 14, 2005, at 7:54 PM, Ian VanDerPoel wrote:
> See below.
>
>>>> Peter Speltz <peterspeltz <at> yahoo.com> 15/04/05 12:23:08 PM >>>
>
> --- Joshua Keroes <jkeroes <at> eli.net> wrote:
>>
>> What's the smart way to go about rendering boolean values (i.e.
>> TINYINT(1)) in the database as checkboxes? More specifically, is there
>> an update to CDBI::AsForm that includes checkbox support? I thought  
>> we'd
>> gone over this before on the list, but google's not finding any  
>> matches.
>>
>
>> Ian on this and the cdbi list has checkbox and radio button support  
>> in his
>> AsForm.  I used to have a copy but can't find it at the moment.   
>> Basically just
>> make a "_to_bool_checkbox" sub and put a clause like this in  
>> "to_field" with
>> all the other clauses like this:
>
>> return $self->_to_bool_checkbox($col) if $type && $type =~  
(Continue reading)

Joshua Keroes | 15 Apr 2005 03:05

CDBI::AsForm and checkboxes


What's the smart way to go about rendering boolean values (i.e. 
TINYINT(1)) in the database as checkboxes? More specifically, is there 
an update to CDBI::AsForm that includes checkbox support? I thought we'd 
gone over this before on the list, but google's not finding any matches.

Thanks,
Joshua
Sebastian Riedel | 20 Mar 2005 22:05
Picon

Re: Testing?

Dave Howorth wrote:

> Do any of you have a testing methodology for Maypole-based apps that 
> you're able to share?

Catalyst has a very extensive testing framework, maybe you want to 
backport it.

--
sebastian
Sebastian Riedel | 10 Mar 2005 22:49
Picon

Catalyst Mailinglists!

Thanks to Danijel we now have Mailinglists for Catalyst, yay!

You can subscribe at:

    http://lists.rawmode.org/mailman/listinfo/catalyst

and

    http://lists.rawmode.org/mailman/listinfo/catalyst-dev

We also now officially opened our irc channel #catalyst on irc.perl.org

Have fun!

--
sebastian
Sebastian Riedel | 10 Mar 2005 12:08
Picon

Catalyst app survives slashdotting! :)

Jesse Sheidlower (the_jester in #maypole) used Catalyst for the newest 
incarnation of the Science Fiction Citation Project 
(http://www.jessesword.com/sf), which got slashdotted yesterday.

http://slashdot.org/articles/05/03/09/182214.shtml?tid=214&tid=1

The server is just a poor two year old PIII 750Mhz with twin 15k SCSI 
drives (hardware RAID1) running Apache 1.3.31, mod_perl 1.29, MySQL and 
Catalyst.

It not only survived, it served with a reasonable speed all the time! :)

--
sebastian
Christopher Hicks | 1 Mar 2005 22:33

use URI in Plugin/Authentication/UserSessionCookie.pm

Among other problems I had was that MPA:USC blew up because there was no 
use URI line before the "URI->new()" code in login_user.  Sticking use URI 
in fixed this.

--

-- 
</chris>

"There are four boxes to be used in defense of liberty:
  soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Rolf Schaufelberger | 1 Mar 2005 13:58
Picon

Re: invalid CODE

Am Dienstag 01 März 2005 13:18 schrieb Simon Flack:
> Rolf Schaufelberger wrote:
> > Hi,
> >
> > I want to use the Maypole (Class::DBI) Classes outside Maypole (I have
> > some scripts, feeding my database)
> >
> > So, for Maypole I have my
> > BeerDB.pm and some BeerDB/Pub.om, BeerDB/Beer.pm etc
> >
> > To use it outside Maypole I've setup a
> > Beer/DBI.pm which just calls
> > Class::DBI::Loader to create the classes.
> >
> > But now I get an compile error
> >
> > invalied CODE attribute: Exported at bla/bla/BeerDB/Users.pm
> >
> > (and BeerDB/Users I have: sub authenticate : Exported {..} )
> >
> > adding "use attributes" changed nothing, reading the attributes man page
> > doesn't really help me. What's wrong ?
>
> 'Exported' isn't a built in code attribute, and must be defined in your
> BeerDB::* CDBI classes or in their  <at> ISA inheritance tree. When you use
> your Class::DBI classes in Maypole, the Exported attribute will be
> defined for you. You're getting this error since you're trying to use
> those classes outside Maypole without defining the attribute.

Yes, that was probably the last thing I've understood when reading the man 
(Continue reading)

Simon Cozens | 27 Feb 2005 20:06
Favicon
Gravatar

This List is (theoretically) Dead

Sorry, I've just realised that this list is still up and running. After my
hardware failure two weeks ago, I'm currently reorganising the services I
host to ensure that they have better backup and failure provision. At the
moment I can't guarantee that my machine will be around for ever, and so Simon
F has started up a new mailing list hosted at Sourceforge.

Please see http://maypole.perl.org/?MailingList for more information.

After a discreet period, maypole <at> lists.netthink.co.uk will redirect posts to
maypole <at> lists.sourceforge.net

Thanks,
Simon

--

-- 
<Ratz> Whr hv ll th vwls gn?
<doop> lng tm pssng
Imran | 27 Feb 2005 09:14

New user (pt 2?)

Hello again, 

Quite a while ago I wrote a simple frontend to a simple db.  I think all I did
was modify the beerdb example.  my db was very similiar db wise.  Got confused
with some bugs, I think.  and then I couldn't figure out how to sort the
columns in my own order (it does it alphabetically). 

Anyway, decided to do it again (2.09 or whatever is latest as of couple of
days ago) but use one table.  I have a jokes section on my site, and wanted to
just create an admin for it.  I'm using mod_perl.  and proxying the app to
real server (didn't want restarts affecting real server). 

Location for the PerlHandler is /perl/jokes/.  doc root is /web/niazi,  have
templates from the maypole distribution in /web/niazi/perl/jokes (no subdirs).
and the code is at the bottom.  (After writing this email, adding this: My
questions are both 'what is the right answer', but also 'Where do the docs
show this answer?')  First of all if I browse to /perl/jokes/  it shows the
'poorly configured' maypole page. All good so far. There is one link "List by
joke", since I only specified one table.  But its a broken link:
http://www.niazi.net/perl/joke/list

What did I do wrong?  It should be
"http://www.niazi.net/perl/jokes/joke/list".  Or atleast that works.  (ok, i
figured this out... forgot '/' at the end of uri_base.  but in my defense i
was following the example).  

Also the maypole.css was in the same dir as the template files.  but the link
it points to is '/maypole.css' which is the webroot.  the factory templates
shouldn't root the maypole.css. should be relative.

(Continue reading)


Gmane