Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

brentdax (2147)

  (email not shown publicly)
AOL IM: Brent Dax (Add Buddy, Send Message)

Just another Perl bigot...

Journal of brentdax (2147)

Sunday July 03, 2005
11:17 AM

Kontent Day 1: Stubbed

[ #25494 ]

(This was written yesterday, but I wasn't able to post it until today.)

I've decided to use this old blog as a log of my activities on Kontent, my Summer of Code project. The goal of the project is to build a dynamic, versioning, highly-customizable CMS in Perl 6.

My family had a vacation planned for the Fourth of July--we're visiting family in Michigan. However, I'm not letting that stop me from working on my project, so I brought a laptop loaded with Ubuntu, Eclipse, Apache, MySQL and Pugs so I can work.

I got in about four hours of work today. (A lot of my time was lost fiddling with Linux's suspend-to-disk behavior; my laptop has a slightly exotic wide screen that requires special treatment whenever the system boots.) In that time, I managed to stub out the basics of Kontent. My "test.p6" looks like this:


module WWW::Kontent;

use WWW::Kontent::Foundation;
use WWW::Kontent::Store::Dummy;
use WWW::Kontent::Renderer::Raw;

my $;
my $;
my $;

$page.adapter($skel, $request);

warn $skel.perl;

my $output=$skel.render($request);

say "Content-Type: $request.type()";
say $output;

If you're familiar with Kontent's five-part design, you may be asking, "where's the class?" Well, the two calls for it are there (driver and adapter). In the final version, the so-called "class" will actually be a role composed into the Page object, but Pugs doesn't support roles yet, so that isn't really possible.

At this point, everything is stubbed well enough that this produces a hello world. Huzzah.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.