Dancer::Logger::PSGI(3pm) User Contributed Perl Documentation Dancer::Logger::PSGI(3pm)NAME
Dancer::Logger::PSGI - PSGI Log handler for Dancer
VERSION
version 0.04
SYNOPSIS
In your Dancer's environment file:
logger: PSGI
- plack_middlewares:
-
- ConsoleLogger
In your application
warning "this is a warning"
With Plack::Middleware::ConsoleLogger, all your log will be send to the JavaScript console of your browser.
DESCRIPTION
This class is an interface between your Dancer's application and psgix.logger. Message will be logged in whatever logger you decided to use
in your Plack handler. If no logger is defined, nothing will be logged.
AUTHOR
franck cuny <franck@lumberjaph.net>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by franck cuny.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
AUTHOR
franck cuny <franck@lumberjaph.net>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by franck cuny.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-05-07 Dancer::Logger::PSGI(3pm)
Check Out this Related Man Page
LWP::Protocol::PSGI(3pm) User Contributed Perl Documentation LWP::Protocol::PSGI(3pm)NAME
LWP::Protocol::PSGI - Override LWP's HTTP/HTTPS backend with your own PSGI applciation
SYNOPSIS
use LWP::UserAgent;
use LWP::Protocol::PSGI;
# can be Mojolicious, Catalyst ... any PSGI application
my $psgi_app = do {
use Dancer;
setting apphandler => 'PSGI';
get '/search' => sub {
return 'googling ' . params->{q};
};
dance;
};
LWP::Protocol::PSGI->register($psgi_app);
# can hijack any code or module that uses LWP::UserAgent underneath, with no changes
my $ua = LWP::UserAgent->new;
my $res = $ua->get("http://www.google.com/search?q=bar");
print $res->content; # "googling bar"
DESCRIPTION
LWP::Protocol::PSGI is a module to hijack any code that uses LWP::UserAgent underneath such that any HTTP or HTTPS requests can be routed
to your own PSGI application.
Because it works with any code that uses LWP, you can override various WWW::*, Net::* or WebService::* modules such as WWW::Mechanize,
without modifying the calling code or its internals.
use WWW::Mechanize;
use LWP::Protocol::PSGI;
LWP::Protocol::PSGI->register($my_psgi_app);
my $mech = WWW::Mechanize->new;
$mech->get("http://amazon.com/"); # $my_psgi_app runs
METHODS
register
LWP::Protocol::PSGI->register($app);
my $guard = LWP::Protocol::PSGI->register($app);
Registers an override hook to hijack HTTP requests. If called in a non-void context, returns a Guard object that automatically resets
the override when it goes out of context.
{
my $guard = LWP::Protocol::PSGI->register($app);
# hijack the code using LWP with $app
}
# now LWP uses the original HTTP implementations
unregister
LWP::Protocol::PSGI->unregister;
Resets all the overrides for LWP. If you use the guard interface described above, it will be automatically called for you.
AUTHOR
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
COPYRIGHT
Copyright 2011- Tatsuhiko Miyagawa
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Plack::Client LWP::UserAgent
perl v5.12.3 2011-05-12 LWP::Protocol::PSGI(3pm)
Hey guys, i'm in trouble, i'm high school teacher, and a student ask me for help, he want's to know where he can study C language for his application exam. Somebody could help us? (1 Reply)
hi i am new to c programming and found this on the net could someone tell me what it actually does, many thanks in advance cheers
#include <fcntl.h>
main()
{
int fd;
fd = open("in1", O_RDONLY);
printf("%d\n", fd);
}
and this too please
#include <fcntl.h>
main()
{
int... (1 Reply)
Hi,
Apologies if this question has been asked before.
I would like to know which language is better to learn in terms of programming in unix? is C dying out and being replaced by C++ or is it a combination of the 2 or just mainly C?
Thanks
C19 (2 Replies)
How could I get the name of user of a file in a file path ?
OR
Who i accessing the particular file in a file path ?
Any Idea ??
Please help !!
Thanks :) (1 Reply)
Hello friends. I am new to Unix although i am very flexible to any programming language. i was a window user. Now, no more. I have decided myself to switch to unix.
Here is my problem:
I burned the free BSD into my new RW CD's. I inserted the bootable manager first then, it was scanning and... (5 Replies)
Hi all,
I am working on a software, which was developed using C programming on unix environment. I have added certain functionality to the software.
Now, I interested in measuring time taken by new functionality (Mean value of huge amount of tests). Since new function will be part of many... (14 Replies)
Hello.
I like Linux and C programming language. Allways wanted to understand kernel and become a Linux system programmer. And I also like Objective-C and iOS. These two programming areas have relations:
1. Linux and iOS are UNIX-like systems, POSIX compliant.
2. It is useful to know C language... (2 Replies)
Greetings there foreign forum visitors. I am completely new to programming, in fact i have only started today, but i am a fast learner. I decided to undertake Perl and i wrote a simple program that has 2 main loops , each of which are supposed to take an input value number from the user, and check... (3 Replies)