GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
pgFormatter::CGI(3) User Contributed Perl Documentation pgFormatter::CGI(3)

pgFormatter::CGI - Implementation of CGI-BIN script to format SQL queries.

Version 5.2

This module is called by pg_format program, when it detects it is run in CGI environment. In such case all control over flow is passed to this module by calling:

    my $program = pgFormatter::CGI->new();
    $program->run()

Object constructor, calls set_config method to set default values for various parameters.

Wraps all work related to generating html page.

It calls set of functions to get CGI object, receive parameters from request, sanitize them, beautify query (if provided) and print ghtml.

Creates CGI object, and sets POST size limit

Sets config for the page and beautifier. URLs, names of auxiliary files, configuration for pgFormatter::Beautify module.

Loads, and returns, default CSS from __DATA__.

Gets values of parameters, and possibly uploaded file from CGI object to structures in $self.

Overrides parameter values if given values were not within acceptable ranges.

Runs beautification on provided query, and stores new version in $self->{'content'}

Outputs body of the page.
Outputs footer of the page

Helper function to try to load file. If it succeeds, it returns file content, it not, it returns empty string (instead of dying).
Outputs page headers - both HTTP level headers, and HTML.

__DATA__ section (at the end of this file) is used to store default CSS Style, so that it will not "pollute" Perl code, and will not need to be indented.

pgFormatter is an original work from Gilles Darold

Please report any bugs or feature requests to: https://github.com/darold/pgFormatter/issues

Copyright 2012-2021 Gilles Darold. All rights reserved.

pgFormatter is free software distributed under the PostgreSQL Licence.

A modified version of the SQL::Beautify Perl Module is embedded in pgFormatter with copyright (C) 2009 by Jonas Kramer and is published under the terms of the Artistic License 2.0.

2021-12-03 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.