モジュール名

Google 電卓用のモジュールを作った。

http://svn.unknownplace.org/public/library/perl/trunk/WWW-GoogleCalc/

なんか名前がむずかしい。

CPAN みると google 関係だけで

  • Net::Google::*
  • WWW::Google::*
  • WebService::Google::*

とかありまくるし。どれつかえばええねん。

こういう、無理矢理ハック系のは WWW かなとおもったので WWW::GoogleCalc としたのだけど、どうなんだろう。

by typester / at 2006-05-15T07:58:00 / perl / Comment

PlaggerLDR

[743] - Plagger - Trac

rating 対応。

by typester / at 2006-05-15T05:58:00 / plagger / Comment

YAML.pm bug?

use strict; use warnings;

use Data::Dumper;
use YAML;

my $config = {
    default => [ 1, { '*' => 1 }, ],
    deny    => ['script'],
};

my $yaml = Dump($config);

print $yaml;
print Dumper( Load($yaml) );

output:

---
default:
  - 1
  - '*': 1
deny:
  - script
YAML Error: Couldn't parse single line value
   Code: YAML_PARSE_ERR_SINGLE_LINE
   Line: 5
   Document: 1
 at /usr/local/share/perl/5.8.7/YAML.pm line 60

This code works fine with YAML::Syck.

by typester / at 2006-05-15T04:02:00 / perl · yaml / Comment

出社。

by typester / at 2006-05-14T20:45:00 / life / Comment

Hachathon in CL

中。

なんか

by typester / at 2006-05-13T03:50:00 / life · plagger · plaggercon / Comment

出社。

by typester / at 2006-05-12T13:32:00 / life / Comment

退社。

by typester / at 2006-05-12T02:26:00 / life / Comment

なんかぼけてたのなおした。

by typester / at 2006-05-11T06:48:00 / life / Comment

PlaggerLDR 改造

簡易認証追加と server.pl -d のときだけデバッグモードになるように

Index: lib/PlaggerLDR/Controller/API.pm
===================================================================
--- lib/PlaggerLDR/Controller/API.pm    (revision 1819)
+++ lib/PlaggerLDR/Controller/API.pm    (working copy)
@@ -12,8 +12,9 @@
 my $module = first { $_->{module} eq 'Store::DBIC' } @{$config->{plugins}};
 my $schema = Plagger::Schema::SQLite->connect(@{$module->{config}->{connect_info}});

-sub default : Private {
+sub auto : Private {
     my($self, $c) = @_;
+    $c->user;
 }

 sub subs : Local {
Index: lib/PlaggerLDR.pm
===================================================================
--- lib/PlaggerLDR.pm   (revision 1819)
+++ lib/PlaggerLDR.pm   (working copy)
@@ -3,21 +3,45 @@
 use strict;
 use warnings;

-use Catalyst qw/-Debug/;
+use Catalyst qw(
+    Authentication
+    Authentication::Credential::Password
+    Authentication::Store::Minimal

+    Session
+    Session::State::Cookie
+    Session::Store::FastMmap
+);
+
 __PACKAGE__->config(
     name => 'PlaggerLDR',
     'View::JSON' => {
         expose_stash => 'json',
     },
+    authentication => {
+        users => {
+            your_username => { password => 'your_password', },
+        },
+    },
 );
 __PACKAGE__->setup;

 sub default : Private {
     my ( $self, $c ) = @_;

-    # Hello World
-    $c->response->body( $c->welcome_message );
+    $c->login(
+        $c->req->params->{u},
+        $c->req->params->{p},
+    );
+
+    $c->res->status(404);
 }

 1;
by typester / at 2006-05-11T06:22:00 / plagger · catalyst / Comment

出社。

by typester / at 2006-05-10T15:20:00 / life / Comment

104 105 106 107 108 109 110 111 112 113

(Page 108 of 203)