CGI-Application-Plugin-PageLookup

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

t/mixnmatch.t
t/submenu.t
t/templ/mix.tmpl
t/templ/dog.tmpl
Changes
lib/CGI/Application/Plugin/PageLookup.pm
lib/CGI/Application/Plugin/PageLookup/Href.pm
lib/CGI/Application/Plugin/PageLookup/Loop.pm
lib/CGI/Application/Plugin/PageLookup/Menu.pm
lib/CGI/Application/Plugin/PageLookup/Value.pm
Build.PL
Makefile.PL
MANIFEST
README
t/00-load.t
t/basic.t
t/boilerplate.t
t/changes.t
t/expires.t

META.yml  view on Meta::CPAN

provides:
  CGI::Application::Plugin::PageLookup:
    file: lib/CGI/Application/Plugin/PageLookup.pm
    version: 1.8
  CGI::Application::Plugin::PageLookup::Href:
    file: lib/CGI/Application/Plugin/PageLookup/Href.pm
    version: 1.8
  CGI::Application::Plugin::PageLookup::Loop:
    file: lib/CGI/Application/Plugin/PageLookup/Loop.pm
    version: 1.8
  CGI::Application::Plugin::PageLookup::Menu:
    file: lib/CGI/Application/Plugin/PageLookup/Menu.pm
    version: 1.8
  CGI::Application::Plugin::PageLookup::Value:
    file: lib/CGI/Application/Plugin/PageLookup/Value.pm
    version: 1.8
generated_by: Module::Build version 0.35
meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: 1.4
keywords:
  - cgiapp

README  view on Meta::CPAN

data that should be consistent across a language (cgiapp_lang).
There is also facility for using "dot notation" objects as described in HTML::Template::Plugin::Dot.
This module also makes it easy to manage your XML sitemaps, meta data, not found pages and expiry headers
	
In particular this module provides:

	Value	- manage pieces of text that are scattered across a website
	Loop	- manage repitive list style structures in a website
	Href	- manage your URLs so that they are always search engine friendly, independent
		of internal representation and always in the language of that page.
	Menu	- manage your menus and human readable sitemaps

INSTALLATION

To install this module, run the following commands:

	perl Makefile.PL
	make
	make test
	make install

lib/CGI/Application/Plugin/PageLookup/Menu.pm  view on Meta::CPAN

package CGI::Application::Plugin::PageLookup::Menu;

use warnings;
use strict;
use Carp;

=head1 NAME

CGI::Application::Plugin::PageLookup::Menu - Support for consistent menus across a multilingual website

=head1 VERSION

Version 1.8

=cut

our $VERSION = '1.8';

=head1 DESCRIPTION

lib/CGI/Application/Plugin/PageLookup/Menu.pm  view on Meta::CPAN

				</TMPL_IF>
			</li>
		</TMPL_LOOP>
		</ul>	
		</TMPL_IF>
	</li>
    </TMPL_LOOP>
    </ul>

and the intention is that this should be the same on all English pages, the same on all Vietnamese pages etc etc.
You must register the "menu" parameter as a CGI::Application::Plugin::PageLookup::Menu object as follows:

    use CGI::Application;
    use CGI::Application::Plugin::PageLookup qw(:all);
    use CGI::Application::Plugin::PageLookup::Menu;
    use HTML::Template::Pluggable;
    use HTML::Template::Plugin::Dot;

    sub cgiapp_init {
        my $self = shift;

        # pagelookup depends CGI::Application::DBH;
        $self->dbh_config(......); # whatever arguments are appropriate

        $self->html_tmpl_class('HTML::Template::Pluggable');

        $self->pagelookup_config(

                # load smart dot-notation objects
                objects =>
                {
                        # Register the 'values' parameter
                        menu => 'CGI::Application::Plugin::PageLookup::Menu',
		},

	);
    }

=head1 NOTES

=over

=item

lib/CGI/Application/Plugin/PageLookup/Menu.pm  view on Meta::CPAN

=head1 BUGS

Please report any bugs or feature requests to C<bug-cgi-application-plugin-pagelookup at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Application-Plugin-PageLookup>.  I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.

=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc CGI::Application::Plugin::PageLookup::Menu


You can also look for information at:

=over 4

=item * RT: CPAN's request tracker

L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=CGI-Application-Plugin-PageLookup>

lib/CGI/Application/Plugin/PageLookup/Menu.pm  view on Meta::CPAN


This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.


=cut

1; # End of CGI::Application::Plugin::PageLookup::Menu

t/00-load.t  view on Meta::CPAN

#!perl -T

use Test::More tests => 5;

BEGIN {
    use_ok( 'CGI::Application::Plugin::PageLookup' );
    use_ok( 'CGI::Application::Plugin::PageLookup::Href' );
    use_ok( 'CGI::Application::Plugin::PageLookup::Loop' );
    use_ok( 'CGI::Application::Plugin::PageLookup::Value' );
    use_ok( 'CGI::Application::Plugin::PageLookup::Menu' );
}

diag( "Testing CGI::Application::Plugin::PageLookup $CGI::Application::Plugin::PageLookup::VERSION, Perl $], $^X" );

t/menu.t  view on Meta::CPAN

}

use DBI;
use CGI;
use TestApp;

$ENV{CGI_APP_RETURN_ONLY} = 1;
my $params = {remove=>['template','pageId','internalId','changefreq'], 
	template_params=>{case_sensitive=>1},
	objects=>{
		loop=>'CGI::Application::Plugin::PageLookup::Menu'
	}
};

sub response_like {
        my ($app, $header_re, $body_re, $comment) = @_;

        local $ENV{CGI_APP_RETURN_ONLY} = 1;
        my $output = $app->run;
        my ($header, $body) = split /\r\n\r\n/m, $output;
        $header =~ s/\r\n/|/g;

t/menu2.t  view on Meta::CPAN

}

use DBI;
use CGI;
use TestApp;

$ENV{CGI_APP_RETURN_ONLY} = 1;
my $params = {remove=>['template','pageId','internalId','changefreq','check2'], 
	template_params=>{case_sensitive=>1},
	objects=>{
		loop=>'CGI::Application::Plugin::PageLookup::Menu'
	}
};

sub response_like {
        my ($app, $header_re, $body_re, $comment) = @_;

        local $ENV{CGI_APP_RETURN_ONLY} = 1;
        my $output = $app->run;
        my ($header, $body) = split /\r\n\r\n/m, $output;
        $header =~ s/\r\n/|/g;

t/menu2a.t  view on Meta::CPAN

}

use DBI;
use CGI;
use TestApp;

$ENV{CGI_APP_RETURN_ONLY} = 1;
my $params = {remove=>['template','pageId','internalId','changefreq','check2'], 
	template_params=>{case_sensitive=>1},
	objects=>{
		loop=>'CGI::Application::Plugin::PageLookup::Menu'
	}
};

sub response_like {
        my ($app, $header_re, $body_re, $comment) = @_;

        local $ENV{CGI_APP_RETURN_ONLY} = 1;
        my $output = $app->run;
        my ($header, $body) = split /\r\n\r\n/m, $output;
        $header =~ s/\r\n/|/g;

t/mixnmatch.t  view on Meta::CPAN

}

use DBI;
use CGI;
use TestApp;

$ENV{CGI_APP_RETURN_ONLY} = 1;
my $params = {remove=>['template','pageId','internalId','changefreq','check2'], 
	template_params=>{case_sensitive=>1},
	objects=>{
		loop=>'CGI::Application::Plugin::PageLookup::Menu'
	}
};

sub response_like {
        my ($app, $header_re, $body_re, $comment) = @_;

        local $ENV{CGI_APP_RETURN_ONLY} = 1;
        my $output = $app->run;
        my ($header, $body) = split /\r\n\r\n/m, $output;
        $header =~ s/\r\n/|/g;

t/submenu.t  view on Meta::CPAN

}

use DBI;
use CGI;
use TestApp;

$ENV{CGI_APP_RETURN_ONLY} = 1;
my $params = {remove=>['template','pageId','internalId','changefreq','check2'], 
	template_params=>{case_sensitive=>1},
	objects=>{
		loop=>'CGI::Application::Plugin::PageLookup::Menu'
	}
};

sub response_like {
        my ($app, $header_re, $body_re, $comment) = @_;

        local $ENV{CGI_APP_RETURN_ONLY} = 1;
        my $output = $app->run;
        my ($header, $body) = split /\r\n\r\n/m, $output;
        $header =~ s/\r\n/|/g;



( run in 0.707 second using v1.01-cache-2.11-cpan-49f99fa48dc )