Apache-PageKit
view release on metacpan or search on metacpan
- Fix: a new typo in Makefile.PL
-+binmode $template_fh, ':encoding($default_input_charset)';
++binmode $template_fh, ":encoding($default_input_charset)";
( Boris Zentner )
1.16
! The param method returns a empty list in list context if
the param was not defined. Older PageKits returned undef
( Boris Zentner )
- Fix: add missing : in binmode $fh, ":encoding(...)";
( Boris Zentner )
- Fix: typo in scripts/pkit_rename_app.pl ( Boris Zentner )
1.15
- Add: request_class parameter just for the case, that you like
another class or subclass do what Apache::Request do for you.
Defaults to Apache::Request::PageKit ( Boris Zentner )
- Fix: conversion error if the tmpl file's encoding is != utf8 and no
content_var's are used. affects only perl < 5.8.0
( Boris Zentner )
- Add: Basic testsuite ( Boris Zentner )
- Remove setup_eg.pl this file is obsolete ( Boris Zentner )
- Fix: Fresh created session cookie headers are wrongly not send
( Boris Zentner, Shimon Rura )
- Remove Apache->request calls from Apache::PageKit::Edit
just to make apache 2 changes smaller ( Boris Zentner )
- Fix: Parse Accept-Charsets more pettier ( Boris Zentner )
! If the client browser has no accept charset header or no good one,
deliver in the default_output_charset and set the charset
in the content_type header. ( Erik Günther )
- Fix uri_prefix in conjunction with can_edit
( Boris Zentner, Erik Günther )
1.13
- Add scripts/pkit_rename_app.pl it helps to start new applications
fast ( Boris Zentner )
- Add <PKIT_COMMENT> and </PKIT_COMMENT> tags. ( Boris Zentner )
- Fix filetest for upload_tmp_dir ( Boris Zentner )
- Fix locale support. One message was twice in the .po files.
( Boris Zentner )
- Fix Encoding of Apache::PageKit::Edit. Use HTML::Entities
and encode only '<>&"' ( Boris Zentner )
- Fix encoding of Apache::ErrorReport stacktrace
( Boris Zentner, Paul Flinders )
1.12
- When user logs out of a page that requires a login,
goes to default_page instead of login_page
- Fixed bug with cache when new template was placed in a
directory when there was already a corresponding template
in the 'Default' directory
- Added pkit_cleanup_code hook for Model class (Boris Zentner)
- Error code rewritten, since using $SIG{__DIE__} does not
play well with eval, and there were problems with the
server hanging after a die, when the session wasn't
properly deleted. Die's are now trapped using 'eval'.
Also renamed Apache::PageKit::Error to Apache::ErrorReport
- pkit_message works when you perform a redirect
using $model->pkit_redirect
- Fixed bug with use_template is set to 'no'
- Fixed bug with XPath queries.
- Fixed bug with locating only files in Page dir for
preparse_templates
0.97 Wed Apr 25 17:07:31 2001 EST
- Login code has been rewritten. To attempt a login, the
pkit_login request parameter must be set.
- Fixed typo with login/out message.
- Components can now have content associated with them
(needs testing)
- Fixed problems with Content caching when page_id contains
'/' - content cache files are now determined my using
a MD5 hash
0.96 Fri Feb 02 04:18:22 2001 EST
- added $model->pkit_input_hashref method, gets inputs
(request params) as a reference to hash
- renamed pkit_set_page_id to pkit_internal_redirect
easier to remember and naming consistant with
pkit_redirect method
- Added installation troubleshooting tips, thanks to
Chris Burbridge and Nick Wood for helpful pointers
- Apache::PageKit->handler and startup are now called as
class methods
- pagekit.org example cookies should work even when
the url is not of the form *.pagekit.org
- fixed error when cookie_domain was not set
- cookie_domain is now a NMTOKENS field and you can pass
in preparation for 1.0 beta release.
- Removed seldom used options and replaced others with
more user-friendly versions.
- Renamed Controller directory to Config directory
- Renamed <TMPL_VAR> and <TMPL_LOOP> tags to
<MODEL_VAR> and <MODEL_LOOP> for Model Data and
<CONTENT_VAR> and <CONTENT_LOOP> for Content Data and
<PKIT_VAR> and <PKIT_LOOP> for PageKit Data
- Renamed <PKIT_INCLUDE> to <PKIT_COMPONENT> and replaced
'include' with 'component' across the framework
- Moved and renamed nav_title option from config to
<NAV_TITLE> </NAV_TITLE> in content XML for
better foreign language support.
- Renamed Apache::PageKit::FormValidator to Apache::PageKit::Model
and redesigned class to replace form_validator
constructor option with $model->validate_input($hash_ref)
method. Eliminated error_page and error_page_run_code
options (user should use $pk->continue
in model instead). This should make the development
easier because all the logic is in the Model class instead
being scattered across the derived class and configuration.
MANIFEST
META.yml Module meta-data (added by MakeMaker)
migration/migrate_content_0.96_to_0.97.xsl
migration/migrate_pagekit_0.05_to_0.89.pl
migration/migrate_pagekit_0.96_to_0.97.pl
migration/migrate_pagekit_0.98_to_0.99.pl
migration/migrate_pagekit_0.99_to_1.00.pl
migration/migrate_pagekit_1.05_to_1.06.pl
migration/README
README
scripts/pkit_rename_app.pl
scripts/pkit_setup_db.pl
scripts/pkit_setup_sqlite_dbfile.pl
t/01_dummy.t
t/02_language.t
t/03_charset.t
t/04_anon_cookies.t
t/05_account.t
t/06_login.t
t/07_restricted.t
t/08_fresh_cookie_redirect.t
lib/Apache/PageKit/FAQ.pod view on Meta::CPAN
The mod_perl guide has an excellect section on compiling mod_perl and
Apache from source. http://perl.apache.org/guide/
=head2 2.2 Do I really need to recompile Apache? It works without I<Apache::PageKit>.
No, if you use I<Apache::PageKit E<gt>= 1.08> and promise to never use C<XML::Parser>. Else yes, you must recompile Apache.
=head2 2.3 perl Makefile.PL result in Can't locate Apache/test.pm in @INC ...
You use I<mod_perl-1.28> or higher. I<Apache::test> is obsolete and renamed to
Apache::testold. The future is I<Apache::Test>. To get around the error type
perl -i -pe 's/Apache::test\b/Apache::testold/g' Makefile.PL
Or even better upgrade I<Apache::Pagekit> to a version > 1.11. There we use
I<Apache::Test>.
=head2 2.4 I can not build libapreq or it stops working after a reboot.
You use perl >= 5.8.1 which includes a new version of ExtUtils::MakeMaker.
migration/README view on Meta::CPAN
4. $model->input_param('pkit_user') and $model->output_param('pkit_user')
is no longer set by authentication code. Instead, set
$model->pnotes(pkit_user => $pkit_user) in your
pkit_auth_session_key in your model code and use
$model->pnotes('pkit_user') to access the set value
=============================================================
Migration from 0.97 to 0.98
1. Apache::PageKit::Error has been renamed to Apache::ErrorReport
If you use PerlSetVar PKIT_ERROR_HANDLER anywhere in your httpd.conf
file, you should change it to PerlSetVar ErrorReportHandler
You can do this easily by running:
perl -pi -e 's/PerlSetVar PKIT_ERROR_HANDLER/PerlSetVar ErrorReportHandler/g' httpd.conf
Also if you include Apache::PageKit::Error in your httpd.conf run:
perl -pi -e 's/PerlModule Apache::PageKit::Error/PerlModule Apache::ErrorReport/g' httpd.conf
migration/README view on Meta::CPAN
You should replace the Config/Config.dtd file in your Pagekit directory
with the Config.dtd contained in the eg/ directory of your distribution
to reflect this change.
==============================================================
Migration from 0.93 to 0.94
1. MyPageKit has been replaced with MyPageKit::Model.
To update rename MyPageKit to MyPageKit::Model and rename
auth_credential and auth_session_key to pkit_auth_credential and
pkit_session_credential. Modify methods to take $model as
first argument instead of $pk.
Also, replace handler with pkit_dbi_connect, pkit_session_setup,
and pkit_common_code. See the code in eg/Model/MyPageKit/Common.pm
for an example of how to do this.
migration/migrate_pagekit_0.98_to_0.99.pl view on Meta::CPAN
return unless /\.tmpl$/;
note_template("$File::Find::dir/$_");
}},
# follow => 1},
"$root_dir/View"
);
while (my ($k, $v) = each %files){
(my $dir = $k) =~ s(/[^/]*?$)();
File::Path::mkpath($dir);
rename $v, $k;
}
sub note_template {
my ($filename) = @_;
next unless (my $to_file = $filename) =~ s!^($root_dir/View/[^/]*/)(Page/|Component/)(.*)$!$1$3!;
if(exists $files{$to_file}){
# conflict!
die "Files $filename and $files{$to_file} conflict.\nPlease rename one of them and update all reference to them in your application.";
}
$files{$to_file} = $filename;
}
migration/migrate_pagekit_0.99_to_1.00.pl view on Meta::CPAN
# <PKIT_LOOP NAME="MESSAGE">
$cf += ($template =~ s!<PKIT_LOOP +NAME *= *("|')?MESSAGE("|')? *>(.*?)</PKIT_LOOP>!<PKIT_MESSAGES>$3</PKIT_MESSAGES>!sig);
$cf += ($template =~ s!<PKIT_IF +NAME *= *("|')?IS_ERROR("|')? *>(.*?)</PKIT_IF>!<PKIT_IS_ERROR>$3</PKIT_IS_ERROR>!sig);
$cf += ($template =~ s!<PKIT_VAR +NAME *= *("|')?MESSAGE("|')? *>!<PKIT_MESSAGE>!sig);
# <PKIT_VAR NAME="HOSTNAME">
$cf += ($template =~ s!<PKIT_VAR +NAME *= *("|')?HOSTNAME("|')? *>!<PKIT_HOSTNAME>!sig);
if($cf){
print "updated $filename, made $cf substitution(s)\n";
# rename "$filename", "$filename.bak";
open TEMPLATE, ">$filename";
print TEMPLATE $template;
close TEMPLATE;
}
}
scripts/pkit_rename_app.pl view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use FindBin;
use File::Find ();
use XML::LibXML ();
use Cwd ();
use Getopt::Long ();
# $Id: pkit_rename_app.pl,v 1.1 2004/03/03 13:28:30 borisz Exp $
our $VERSION = 0.01;
my %h;
my ( $use_svn, $use_svk );
exit 1 unless ( Getopt::Long::GetOptions ( svn => \$use_svn, svk => \$use_svk ) );
my $new_name = pop || die <<"ENDE";
Usage:
scripts/pkit_rename_app.pl view on Meta::CPAN
if ( $attr->name =~ /^(?:model_base_class|model_dispatch_prefix)$/ ) {
$h{ $attr->name } = $attr->value;
}
}
# check that we have model_base_class and model_dispatch_prefix
die "model_dispatch_prefix or model_base_class is not found in Config/Config.xml"
unless defined $h{model_dispatch_prefix}
and defined $h{model_base_class};
# find the directory to rename
my ($prefix_a) = $h{model_dispatch_prefix} =~ /^(.*)::/;
my ($prefix_b) = $h{model_base_class} =~ /^(.*)::/;
die <<"ENDE" if $prefix_a ne $prefix_b;
$prefix_a ne $prefix_b I give up.
Sure, this may work but NOT with this
script!
ENDE
( my $path = $prefix_a ) =~ s!::!/!g;
scripts/pkit_rename_app.pl view on Meta::CPAN
"$eg_root/Model/$path", "$eg_root/Model/$new_name" ) == 0 or die $?;
my $changes = `svn status`;
system( svk => ci => -m => <<"ENDE" ) == 0 or die $?;
Rename $path to $new_name. And modilfy the following files:
$changes
ENDE
chdir $old_dir || die $!;
}
# no version control
else {
rename "$eg_root/Model/$path", "$eg_root/Model/$new_name";
}
=pod
=head1 Start a new Application with C<Apache::PageKit>
=head1 Overview
This script renames a Apache::PageKit Application and all the modules. Bellow $pkit_root/Model.
=head1 Requirements
You need a working Apache::PageKit application. Not running, you need only the files.
=head1 Usage
pkit_rename_app.pl MyNewAplicationName
pkit_rename_app.pl pkit_root MyNewAplicationName
pkit_rename_app.pl --svn pkit_root MyNewAplicationName
pkit_rename_app.pl --svk pkit_root MyNewAplicationName
C<MyNewAplicationName> is the new name for your application.
C<pkit_root> is the name of root of your application. That is the Directory where F<Config>, F<Model>, F<View> and F<Content> is.
=head1 Description
The script renames the application B<INPLACE> so do it on a backup.
It reads the F<Config/Config.xml> to figure out what your old name is.
Then all is the file F<Config/Config.xml> and all your F<*.pm> files are scanned and and replaced with your new App's name. As a last step your directory F<Model/oldname> is moved to F<Model/newname> thats it.
This might become handy if you start a new application and you can reuse a good part of an older one. It is also helpfull if you work on more sites and you have some virtualhosts running F<Apache::Pagekit> applications.
=head1 Example
Now a little example that clones the example site to anotherone.
cp -r eg a_new_site
pkit_rename_app.pl a_new_site MyNewSite
or with version control
svn co http://mysvn/repository/pagekit/trunk newapp
cd newapp
./scripts/pkit_rename_app.pl --svn eg MyNewApp
or with svk version control
svk co //depotpath/pagekit/trunk newapp
cd newapp
./scripts/pkit_rename_app.pl --svk eg MyNewApp
=head1 AUTHOR
Boris Zentner bzm@2bz.de
( run in 0.472 second using v1.01-cache-2.11-cpan-131fc08a04b )