04-20-2013
How to use emacs? Also how to open existing emacs files with .cgi format?
Hi All,
I am new to this forum and a beginner in unix. Please correct me if I put the question in a wrong way..
How to use emacs editor? Also how to open existing emacs files with .cgi format?
I have the following link :-
http link i.e. url and path : /abc/xyz.dev/xyz/documents
What do I click to get there?
Also, have a couple of cgi scripts.. abc.cgi etc.. how do i open them and understand the scripts without making any changes to the script..
Any suggestions appreciated.
Thanks,
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi i am using mandrake linux
How do i run the emacs editor ? (5 Replies)
Discussion started by: srekcus
5 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I am working with xEmacs 21.1 patch 14.
I see I can configure it to be very User Friendly.
I can highlight variables, color them, and actually make it look like a Visual IDE.
How do I configure it?
How do I color Variables in one color, and make them bold, and how do I change the... (1 Reply)
Discussion started by: sierra_aar
1 Replies
3. UNIX for Dummies Questions & Answers
I have been teaching myself unix a little here and a little there. I would like to learn emacs, or an editor that I would get the most use out of. What is the most used editor in unix? (1 Reply)
Discussion started by: macnix
1 Replies
4. UNIX for Advanced & Expert Users
Hi
How can I do ftp using emacs. I strart the function by M-x ftp. It connects to the server where I can see the list of files. how can I do put or get there?
Thanks
SS (1 Reply)
Discussion started by: saurya_s
1 Replies
5. UNIX for Dummies Questions & Answers
Any one has a good documentation on How To Use EMACs editor??
Thanks
Ven :eek: (4 Replies)
Discussion started by: VENC22
4 Replies
6. Programming
I am using emacs to write c++ code. How to configure it to let the system highlight C++ keywords, variables, etc; and let it automatically indent, just like a common C++ IDE does?
Any suggestions? Thanks! (1 Reply)
Discussion started by: meili100
1 Replies
7. Solaris
Hello, Does anyone know where there is an nice step by step to install emacs?
Or is ti just as easy as download, untar, run an install script sort of deal? (3 Replies)
Discussion started by: komputersman
3 Replies
8. UNIX for Dummies Questions & Answers
could someone please tell me how do I work emacs on unix?? how do you input the command and open up files and edit stuff. I know M-x info will lauch the info viewer, C-x u is undo, M-x spell-region run a spell check but when i use some of these command on emacs in Unix, I'm getting no results or... (1 Reply)
Discussion started by: starwind4
1 Replies
9. UNIX for Dummies Questions & Answers
How do you change characters in emacs? for example, I would like my files to appear written in "Arial" or "Thaoma".. (1 Reply)
Discussion started by: vero_81
1 Replies
10. AIX
After I had successfully installed bash I wanted to install emacs. I downloaded the packages from IBM (emacs, emacs-nox, and emacs-X11), but I could not install emacs-X11. It needs libjpeg and libtiff, but I couldn't install both libs. Error messages:
file /opt/freeware/64 from install of... (2 Replies)
Discussion started by: BuSchu
2 Replies
LEARN ABOUT DEBIAN
plack::app::cgibin
Plack::App::CGIBin(3pm) User Contributed Perl Documentation Plack::App::CGIBin(3pm)
NAME
Plack::App::CGIBin - cgi-bin replacement for Plack servers
SYNOPSIS
use Plack::App::CGIBin;
use Plack::Builder;
my $app = Plack::App::CGIBin->new(root => "/path/to/cgi-bin")->to_app;
builder {
mount "/cgi-bin" => $app;
};
# Or from the command line
plackup -MPlack::App::CGIBin -e 'Plack::App::CGIBin->new(root => "/path/to/cgi-bin")->to_app'
DESCRIPTION
Plack::App::CGIBin allows you to load CGI scripts from a directory and convert them into a PSGI application.
This would give you the extreme easiness when you have bunch of old CGI scripts that is loaded using cgi-bin of Apache web server.
HOW IT WORKS
This application checks if a given file path is a perl script and if so, uses CGI::Compile to compile a CGI script into a sub (like
ModPerl::Registry) and then run it as a persistent application using CGI::Emulate::PSGI.
If the given file is not a perl script, it executes the script just like a normal CGI script with fork & exec. This is like a normal web
server mode and no performance benefit is achieved.
The default mechanism to determine if a given file is a Perl script is as follows:
o Check if the filename ends with ".pl". If yes, it is a Perl script.
o Open the file and see if the shebang (first line of the file) contains the word "perl" (like "#!/usr/bin/perl"). If yes, it is a Perl
script.
You can customize this behavior by passing "exec_cb" callback, which takes a file path to its first argument.
For example, if your perl-based CGI script uses lots of global variables and such and are not ready to run on a persistent environment, you
can do:
my $app = Plack::App::CGIBin->new(
root => "/path/to/cgi-bin",
exec_cb => sub { 1 },
)->to_app;
to always force the execute option for any files.
AUTHOR
Tatsuhiko Miyagawa
SEE ALSO
Plack::App::File CGI::Emulate::PSGI CGI::Compile Plack::App::WrapCGI
See also Plack::App::WrapCGI if you compile one CGI script into a PSGI application without serving CGI scripts from a directory, to remove
overhead of filesystem lookups, etc.
perl v5.14.2 2011-11-02 Plack::App::CGIBin(3pm)