海派开源潮流社区

一起参与开源.共同打造海派开源潮流社区(Kernel/Fedora/CentOS/Perl/Drupal)

Blogs

上海Drupal群09年第一次线下聚会

in

上海Drupal群09年第一次线下聚会

这周六下午老时间、老地点,上海Drupal群第10次线下聚会。
本次聚会主题继续延续前几次的Drupal6系列讲座,主要围绕“Node的显示输出”展开。

对该话题,对Drupal感兴趣的朋友们,欢迎来参加本次聚会。

聚会时间:09.01.10 星期六 下午13:30
聚会地点:上海市襄阳南路100弄10号(近南昌路)
地铁1号线陕西南路站/公交42/911/920/926

请发送报名邮件至peggy@raincitystudios.com,以便我统计人数,谢谢

详情请见:http://raincitystudios.com/cn/blogs-and-pods/peggy-xie/09nianshanghaidrupalersdi%e4%b8%80cijuhui

Popular Frameworks for Perl

in


Mojolicious+Template-toolkit+sqlite 例子

in

这是在一个日本的例子上修改的,主要是改用Template-Toolkit 2 .

1)bbs.pm
package BBS;

use strict;
use warnings;

use base 'Mojolicious';

use MojoX::Renderer::TT;
use Template::Stash ;

# This method will run for each request
sub dispatch {
my ($self, $c) = @_;

# Try to find a static file
my $done = $self->static->dispatch($c);

# Use routes if we don't have a response code yet
$done = $self->routes->dispatch($c) unless $done;

# Nothing found, serve static file "public/404.html"
unless ($done) {
$self->static->serve($c, '/404.html');
$c->res->code(404);
}
}

# This method will run once at server start
sub startup {
my $self = shift;

# Use our own context class
# $self->ctx_class('BBS::Context');

my $tt = MojoX::Renderer::TT->build(
mojo => $self,
template_options => {
POST_CHOMP => 1,
PRE_CHOMP => 1,
STASH => Template::Stash->new,
INCLUDE_PATH => [ $self->home->rel_dir('templates')],
}
);
$self->renderer->add_handler(html => $tt);

# Routes
my $r = $self->routes;

# Default route

这些天学习Linux的总结

in

一开始,打算看自己买的书了

后来发现,这些破书 都TMD扯淡

当然,我也想说,真的要学,还是要自己研究,与朋友探索

/*------来北京这么久 ,我发现一个很现实的问题*---

要想真的有所成就,靠的还是自己,

真正很牛X的人,绝对不是靠学校靠看书学出来的*---/

---------------------------

回忆一下 这些天研究的内容 个人感觉都很根本 环境是 Fedora Linux 8 最郁闷的是有些RPM包找不到

首先是 vi编辑器,这个东东,我到现在都迷茫,毕竟有图形界面的编辑器 所以没有去过多的用

原因是因为一开始使用搞得配置文件惨不忍睹

再就是Linux的命令了 ,说实话 确实很多 当然用久了就记住了

在说的就是 Shell编程了,没怎吗多看,先了解了下 以后要详细研究

----------

linux的网络配置,以及路由,防火墙 NAT服务,个人感觉,自己搞得有点乱,

路由会配置,防火墙也没有多大问题

就是NAT 不怎么会

同样是Unix慢慢发展过来的 但是配置缺很大的不同了

--------------

如何创建属于自己的GNU/Linux发行版

in

于 08-12-27 通过 译言-电脑/网络/数码科技 作者:snowking

原文作者:Brian Brazil, Karl Goetz
原文链接:HowToCreateYourOwnGNULinuxDistribution
译者:snowking

Booking.com donates to The Perl Foundation

in
Booking.com donates to The Perl Foundation
Monday, 15 December 2008

Amsterdam, the Netherlands, Booking.com, Europe's largest and fastest growing online hotel reservation service, donated 50,000 US$ to The Perl Foundation (www.perlfoundation.org), to aid in the further development and maintenance of the Perl programming language in general, and Perl 5.10 in particular.

在Mojolicious中使用Template::Toolkit

in
package Vagina;

use strict;
use warnings;

use base 'Mojolicious';

use MojoX::Renderer::TT;

sub dispatch {
    (ry
}

sub startup {
    my $self = shift;

    # Use our own context class
    $self->ctx_class('Vagina::Context');

    $self->renderer->add_handler( tt => MojoX::Renderer::TT->new( mojo => $self ) );
  

Using Mojolicious with Plain CGI (no mod_perl)

in

难得关于Mojolicious的好文章,赶紧收藏。

 

From : http://www.simplicate.ca/blog/2008/12/using-mojolicious-with-plain-cgi-no-mod-perl.html

My previous article talked about how to get Mojolicious running on your server using mod_perl. This time I'm going to walk you through the steps and suggestions on how to setup your server to work with your Mojolicious application if you aren't using mod_perl.

This should be especially beneficial for people that are in a shared hosting environment and don't have access to mod_perl or people that don't want to introduce mod_perl into an existing server environment.

Mojolicious 入门

in

参照了一篇日文,自己测试一下。

在Fedora 9 和Windows XP 下都成功了。

1) #cpanp -i Mojolicious

Debugging Perl CGI Scripts

in

General Techniques

 

Code Isolation

One of the most useful general purpose techniques for debugging an unknown error is to isolate the code you are testing. You can do this by commenting out bits of code until the program works. When it does, your last edit was causing an error.

HTTP 500 - Internal Server Error

Web servers generally provide ambiguous error messages. Any one of the following techniques will get you better information on your error. Choose which one suits you best or use a combination.

Use CGI::Carp

CGI::Carp is designed to provide better error messages when writing CGI. By default, most web servers direct STDERR to the web server's error log. When debugging CGI it may be convenient to redirect the error messages to the browser (STDOUT). Adding the following line will direct fatal (die, confess) errors to the browser:

 use CGI::Carp qw/fatalsToBrowser/;

CGI::Carp also has the ability to display warning messages to the browser with the warningsToBrowser subroutine.

Syndicate content

Reserved by www.17LAMP.net