AnnoCPAN

 view release on metacpan or  search on metacpan

lib/AnnoCPAN/Control.pm  view on Meta::CPAN

        if ($self->param('fast')) {
            $template = 'error';
        } else {
            ($vars, $template, $type) = $self->Main($vars);
        }
    }
    if ($template) {
        my $default_vars = $self->default_vars;
        $vars = { %$default_vars, %$vars };
        print $self->header(
            -charset => 'UTF-8',
            -cookie => $self->cookies,
            $type ? (-type => $type) : (),
        );
        $template .= '.html' unless $template =~ /\./;
        my $output = '';
        $self->process($template, $vars, \$output) or print $@;
        print $output;
    }
}

lib/AnnoCPAN/XMLCGI.pm  view on Meta::CPAN


=cut

sub param {
    my ($self, $name) = @_;
    $self->{data}{$name};
}

=item $cgi->header

Returns a very simple header ("Content-type: text/html; charset=UTF-8\n\n").

=cut

sub header {
    "Content-type: text/html; charset=UTF-8\n\n";
}

=back

=head1 SEE ALSO

L<CGI>, L<XML::Simple>

=head1 AUTHOR

t/XMLCGI.t  view on Meta::CPAN

open STDIN, '<', 't/note.xml' or die;

my $cgi = AnnoCPAN::XMLCGI->new;

isa_ok ( $cgi,  'AnnoCPAN::XMLCGI' );
is ( $cgi->param('section'),    123,                'param(section)' );
is ( $cgi->param('mode'),       'show',             'param(mode)' );
is ( $cgi->param('note_text'),  'This is a note',   'param(note_text)' );
is ( $cgi->param('id'),         5,                  'param(id)' );

is ( $cgi->header,  "Content-type: text/html; charset=UTF-8\n\n",  'header' );

tt/header.html  view on Meta::CPAN

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>AnnoCPAN - [% title | html %]</title>
    <meta name="description" content='AnnoCPAN is an "Annotated CPAN"; a site
    where users can add notes next to the POD documentation for Perl modules'>
    <meta name="keywords" content="cpan, perl, module, modules, documentation, annocpan">
    <link rel="stylesheet" type="text/css" href="[% root_uri_rel %]/annocpan.css">
    [% IF prefs('style') == 'side' %]
    <link rel="stylesheet" title="margin notes" type="text/css" href="[% root_uri_rel %]/layout-side.css">
    <link rel="alternate stylesheet" title="inline notes" type="text/css" href="[% root_uri_rel %]/layout-inline.css">
    [% ELSE %]
    <link rel="stylesheet" title="inline notes" type="text/css" href="[% root_uri_rel %]/layout-inline.css">

tt/note_help.html  view on Meta::CPAN

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>AnnoCPAN Help</title>
    <link rel="stylesheet" type="text/css" href="[% root_uri_rel %]/annocpan.css">
    <style type="text/css">
      body { padding: 0;}
    </style>
</head>

<body>

<div id="note_help">



( run in 0.407 second using v1.01-cache-2.11-cpan-4d50c553e7e )