This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Can't locate object method "dsl" via package "main" at /usr/local/share/perl5/Dancer/Plugin.pm line 90. | |
Compilation failed in require at ./test.pl line 2. | |
BEGIN failed--compilation aborted at ./test.pl line 2. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl -T | |
use Dancer::Test; | |
use Test::More; | |
BEGIN { | |
use_ok( 'Dancer::Plugin::Database' ) || print "Bail out!"; | |
} | |
diag( "Testing Dancer::Plugin::Database $Dancer::Plugin::Database::VERSION, Perl $], $^X" ); | |
done_testing; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Dancer::Plugin::Database; | |
use strict; | |
use Dancer::Plugin; | |
use DBI; | |
use Dancer::Plugin::Database::Handle; | |
use Dancer qw(syntax); | |
=encoding utf8 | |
=head1 NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Test::More import => ['!pass']; | |
use t::lib::TestApp; | |
use Dancer ':syntax'; | |
use Dancer::Test; | |
eval { require DBD::SQLite }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t | |
t/00-load.t ....... 1/? # Testing Dancer::Plugin::Database 1.51, Perl 5.014002, /usr/bin/perl | |
t/00-load.t ....... ok | |
t/01-basic.t ...... 1/26 | |
# Failed test 'db is created' | |
# at /usr/share/perl5/site_perl/Dancer/Test.pm line 166. | |
# got: '404' | |
# expected: '200' | |
# Failed test 'GET / is found' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Dancer/Plugin.pm b/lib/Dancer/Plugin.pm | |
index cc51cb0..128209d 100644 | |
--- a/lib/Dancer/Plugin.pm | |
+++ b/lib/Dancer/Plugin.pm | |
@@ -96,7 +96,7 @@ sub register { | |
sub register_plugin { | |
my $plugin = caller; | |
my $caller = caller(1); | |
- my $dsl = $caller->dsl; | |
+ #my $dsl = $caller->dsl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Dancer/Plugin/Database.pm b/lib/Dancer/Plugin/Database.pm | |
index da8ecc9..6e94a52 100644 | |
--- a/lib/Dancer/Plugin/Database.pm | |
+++ b/lib/Dancer/Plugin/Database.pm | |
@@ -2,7 +2,6 @@ package Dancer::Plugin::Database; | |
use strict; | |
use Dancer::Plugin; | |
-use Dancer::Config; | |
use DBI; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head1 How to use Dancer::Plugin::Redis | |
Dancer::Plugin::Redis is a plugin created to make an easy way to use Redis database in Dancer apps. In fact, | |
Dancer::Plugin::Redis is an abstraction from Redis plugin. It has only one function C<redis>, which returns a | |
database handle. See Redis module documentation for the list of controlling functions. | |
=head1 Introduction to Redis | |
Redis is key-value, networking, in-memory data store with optional durability. It is very useful technology because | |
it simple and fast. There is a good article about it in Wikipedia(http://en.wikipedia.org/wiki/Redis) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Standard awesome library | |
require("awful") | |
require("awful.autofocus") | |
require("awful.rules") | |
-- Theme handling library | |
require("beautiful") | |
-- Notification library | |
require("naughty") | |
require("vicious") | |
-- {{{ Error handling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
* GNU General Public License for more details. | |
* |
OlderNewer