AxKit-App-TABOO
view release on metacpan or search on metacpan
lib/AxKit/App/TABOO/XSP/Category.pm view on Meta::CPAN
>
Add this taglib to AxKit (via httpd.conf or .htaccess):
AxAddXSPTaglib AxKit::App::TABOO::XSP::Category
=head1 DESCRIPTION
This XSP taglib provides two tags to retrieve a structured XML
fragment with all information of a single category or all categories
of a certain type.
L<Apache::AxKit::Language::XSP::SimpleTaglib> has been used to write
this taglib.
=cut
$NS = 'http://www.kjetil.kjernsmo.net/software/TABOO/NS/Category';
lib/AxKit/App/TABOO/XSP/Language.pm view on Meta::CPAN
>
Add this taglib to AxKit (via httpd.conf or .htaccess):
AxAddXSPTaglib AxKit::App::TABOO::XSP::Language
=head1 DESCRIPTION
This XSP taglib provides two tags to retrieve a structured XML
fragment with all information of a single language or all languages
of a certain type.
L<Apache::AxKit::Language::XSP::SimpleTaglib> has been used to write
this taglib.
=cut
$NS = 'http://www.kjetil.kjernsmo.net/software/TABOO/NS/Language';
scripts/upgrade04to05.pl view on Meta::CPAN
use HTML::Entities;
my $dbh = DBI->connect($dsn, $pguser, $pgpassword);
my $all = $dbh->selectall_hashref('SELECT storyname,minicontent,content FROM stories;', 'storyname');
foreach my $story (values(%{$all})) {
my $formatter1 = Formatter::HTML::Textile->format(encode_entities(decode_utf8(${$story}{content})));
$formatter1->charset('utf-8');
$formatter1->char_encoding(0);
my $content = $formatter1->fragment;
my $formatter2 = Formatter::HTML::Textile->format(encode_entities(decode_utf8(${$story}{minicontent})));
$formatter2->charset('utf-8');
$formatter2->char_encoding(0);
my $minicontent = $formatter2->fragment;
$dbh->do("UPDATE stories SET minicontent=?,content=? WHERE storyname=?", {}, ($minicontent,$content,${$story}{storyname}));
}
my $allc = $dbh->selectall_arrayref('SELECT content FROM comments;');
foreach my $comment (@{$allc}) {
my $formatter1 = Formatter::HTML::Textile->format(encode_entities(decode_utf8(${$comment}[0])));
$formatter1->charset('utf-8');
$formatter1->char_encoding(0);
my $content = $formatter1->fragment;
$dbh->do("UPDATE comments SET content=? WHERE content=?", {}, ($content,${$comment}[0]));
}
( run in 0.657 second using v1.01-cache-2.11-cpan-364913b4093 )