AcePerl
view release on metacpan or search on metacpan
Ace/Browser/AceSubs.pm view on Meta::CPAN
=head1 NAME
Ace::Browser::AceSubs - Subroutines for AceBrowser
=head1 SYNOPSIS
use Ace;
use Ace::Browser::AceSubs;
use CGI qw(:standard);
use CGI::Cookie;
my $obj = GetAceObject() || AceNotFound();
PrintTop($obj);
print $obj->asHTML;
PrintBottom();
=head1 DESCRIPTION
Ace::Browser::AceSubs exports a set of routines that are useful for
creating search pages and displays for AceBrowser CGI pages. See
Ace/Browser/AceSubs.pm view on Meta::CPAN
GetAceObject
Object2URL
ObjectLink
OpenDatabase
PrintTop
PrintBottom
Url
The following subroutines are exported if explicitly requested:
AceAddCookie
AceInit
AceHeader
AceMultipleChoices
AceRedirect
DB_Name
Footer
Header
ResolveUrl
Style
Toggle
Ace/Browser/AceSubs.pm view on Meta::CPAN
The following sections describe the exported subroutines.
=over 4
=cut
use strict;
use Ace::Browser::SiteDefs;
use Ace 1.76;
use CGI qw(:standard escape);
use CGI::Cookie;
use File::Path 'mkpath';
use vars qw/@ISA @EXPORT @EXPORT_OK $VERSION %EXPORT_TAGS
%DB %OPEN $HEADER $TOP @COOKIES
$APACHE_CONF/;
require Exporter;
@ISA = qw(Exporter);
$VERSION = 1.21;
######################### This is the list of exported subroutines #######################
@EXPORT = qw(
GetAceObject AceError AceNotFound AceMissing DoRedirect
OpenDatabase Object2URL Url
ObjectLink Configuration PrintTop PrintBottom);
@EXPORT_OK = qw(AceRedirect Toggle ResolveUrl AceInit AceAddCookie
AceHeader TypeSelector Style AcePicRoot
Header Footer DB_Name AceMultipleChoices);
%EXPORT_TAGS = ( );
use constant DEFAULT_DATABASE => 'default';
use constant PRIVACY => 'misc/privacy'; # privacy/cookie statement
use constant SEARCH_BROWSE => 'search'; # a fallback search script
my %VALID; # cache for get_symbolic() lookups
=item AceError($message)
Ace/Browser/AceSubs.pm view on Meta::CPAN
exit(0);
}
=item AceHeader()
This function prints the HTTP header and issues a number of cookies
used for maintaining AceBrowser state. It is not exported by default.
=cut
=item AceAddCookie(@cookies)
This subroutine, which must be called b<after> OpenDatabase() and/or
GetAceObject() and b<before> PrintTop(), will add one or more cookies
to the outgoing HTTP headers that are emitted by AceHeader().
Cookies must be CGI::Cookie objects.
=cut
sub AceAddCookie {
push @COOKIES,@_; # add caller's to our globals
}
################## canned header ############
sub AceHeader {
my %searches = map {$_=>1} Configuration()->searches;
my $quovadis = url(-relative=>1);
my $db = get_symbolic();
acebrowser/cgi-bin/misc/privacy view on Meta::CPAN
PrintTop(undef,undef,'Privacy Statement');
print
p(
"This server logs the IP address of your browser and each database query.",
"This is done in order to track usage statistics",
"and to identify operational problems. This information is not used",
"to identify individuals or organizations, and is never shared with third",
"parties."
),
p(
"Cookies are used by the search pages in order to bookmark your search",
"requests. They do not persist after you exit the browser, and are never",
"used for identification or tracking purposes."
),
start_form,
hidden(-name=>'referer',-value=>$where_from),
submit(-name=>'return',-label=>'Return to Database'),
end_form;
PrintBottom();
( run in 0.330 second using v1.01-cache-2.11-cpan-e9199f4ba4c )