Does a screen-oriented commands require you to specify an exact location or address for a particular operation ? Y or N cuz im having a debate right now in the office. (1 Reply)
I need to transform this small javascript into a perl. So then when I need to use it I can call $something, instead of using this javascript.
Could someone help me archive this? (9 Replies)
Hello all,
Am trying to include a onChange java script to my perl CGI application which uses POST method to upload files to file_server
This is how I embedded javascript in the perl code that renders CGI application
print qq|
<script type="text/javascript" src="display.js">
</script>... (4 Replies)
Currently Im trying to write a program that manipulates a class-based object as part of its functionality. However, the perl compiler is complaining that the class's respective package is not returning a true value.
I have done the following
a) Created a new package containing the body of the... (1 Reply)
OIOIC is a completely new object-oriented mechanism for the C programming language.
Please download the "OIOIC-Primer-2nd-Edition-English.tar.gz". (the English version of << OIOIC Primer >> )
http://code.google.com/p/oioic/downloads/list
Welcome your advice!
Using OIOIC, you can describe... (7 Replies)
I am new to PHP and UNIX. I am using Apache to do my testing on a Windows Vista machine.
I am getting this error when I am trying to connect to a web service. I did a search and did not see any posts that pertain to this.
Here is my function:
<?php
function TRECSend($a, $b, $c, $d,... (0 Replies)
Hi all,
I'm not even sure a person can do this in perl, seems like you should be able to though.
Here's the error
IO::Socket::INET: connect: Operation now in progress at server_search.pl line 256, <DATA> line 466.
Here's the perl code...
sub ldap_new{
$nl = Net::LDAP->new( "$_" ) or... (3 Replies)
Hi,
I would like to call the below perl web service from javascript .Any help would be appreciated.I am new to web services.Please do the needful.
Server Program(Perl Web Service)
#!/usr/bin/perl
use lib '/usr/lib/perl5/5.8.8/SOAP-Lite-0.65_3/lib';
use SOAP::Transport::HTTP;
use Demo;... (3 Replies)
How to initialize an object of class say "A", with an object of type say "B".
The following code give the error message "error: conversion from âAâ to non-scalar type âBâ requested"
#include <iostream>
using namespace std;
class B;
class A{
public:
A() { cout <<"\nA()" << endl; }
... (1 Reply)
Discussion started by: techmonk
1 Replies
LEARN ABOUT DEBIAN
cgi::psgi
CGI::PSGI(3pm) User Contributed Perl Documentation CGI::PSGI(3pm)NAME
CGI::PSGI - Adapt CGI.pm to the PSGI protocol
SYNOPSIS
use CGI::PSGI;
my $app = sub {
my $env = shift;
my $q = CGI::PSGI->new($env);
return [ $q->psgi_header, [ $body ] ];
};
DESCRIPTION
This module is for web application framework developers who currently uses CGI to handle query parameters, and would like for the
frameworks to comply with the PSGI protocol.
Only slight modifications should be required if the framework is already collecting the body content to print to STDOUT at one place
(rather using the print-as-you-go approach).
On the other hand, if you are an "end user" of CGI.pm and have a CGI script that you want to run under PSGI web servers, this module might
not be what you want. Take a look at CGI::Emulate::PSGI instead.
Your application, typically the web application framework adapter should update the code to do "CGI::PSGI->new($env)" instead of "CGI->new"
to create a new CGI object. (This is similar to how CGI::Fast object is initialized in a FastCGI environment.)
INTERFACES SUPPORTED
Only the object-oriented interface of CGI.pm is supported through CGI::PSGI. This means you should always create an object with
"CGI::PSGI->new($env)" and should call methods on the object.
The function-based interface like "use CGI ':standard'" does not work with this module.
METHODS
CGI::PSGI adds the following extra methods to CGI.pm:
env
$env = $cgi->env;
Returns the PSGI environment in a hash reference. This allows CGI.pm-based application frameworks such as CGI::Application to access PSGI
extensions, typically set by Plack Middleware components.
So if you enable Plack::Middleware::Session, your application and plugin developers can access the session via:
$cgi->env->{'plack.session'}->get("foo");
Of course this should be coded carefully by checking the existence of "env" method as well as the hash key "plack.session".
psgi_header
my ($status_code, $headers_aref) = $cgi->psgi_header(%args);
Works like CGI.pm's header(), but the return format is modified. It returns an array with the status code and arrayref of header pairs that
PSGI requires.
If your application doesn't use "$cgi->header", you can ignore this method and generate the status code and headers arrayref another way.
psgi_redirect
my ($status_code, $headers_aref) = $cgi->psgi_redirect(%args);
Works like CGI.pm's redirect(), but the return format is modified. It returns an array with the status code and arrayref of header pairs
that PSGI requires.
If your application doesn't use "$cgi->redirect", you can ignore this method and generate the status code and headers arrayref another way.
LIMITATIONS
Do not use CGI::Pretty or something similar in your controller. The module messes up CGI's DIY autoloader and breaks CGI::PSGI (and
potentially other) inheritance.
AUTHOR
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
Mark Stosberg <mark@summersault.com>
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
CGI, CGI::Emulate::PSGI
perl v5.12.4 2011-08-29 CGI::PSGI(3pm)