Changeset 24060 for lang/perl/MENTA/trunk
- Timestamp:
- 11/18/08 12:00:13 (5 years ago)
- Location:
- lang/perl/MENTA/trunk
- Files:
-
- 1 added
- 10 modified
-
app/controller/index.mt (modified) (1 diff)
-
app/controller/tutorial.mt (modified) (2 diffs)
-
app/data/data.sqlite (modified) (previous)
-
app/static/style-sites.css (modified) (1 diff)
-
app/tmpl/footer.mt (modified) (1 diff)
-
app/tmpl/header.mt (modified) (1 diff)
-
lib/MENTA.pm (modified) (2 diffs)
-
lib/MENTA/Plugin.pm (added)
-
plugins/counter.pl (modified) (1 diff)
-
plugins/mail.pl (modified) (2 diffs)
-
plugins/sql.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/MENTA/trunk/app/controller/index.mt
r24047 r24060 10 10 //--></script> 11 11 12 <h1><?= $title ?></h1>13 12 <p><?= localtime time ?></p> 14 13 -
lang/perl/MENTA/trunk/app/controller/tutorial.mt
r24047 r24060 1 1 ? my $title = "MENTA 取り扱い説明書" 2 2 ?=r render_partial('header.mt', $title) 3 4 <h1><?= $title ?></h1>5 3 6 4 <h2>ダウンロードする</h2> … … 47 45 <p><a href="<?= uri_for('counter') ?>">実際にうごいている様子</a></p> 48 46 47 <h2>プラグインの作り方</h2> 48 49 あとでかく。 50 49 51 ?=r render_partial('footer.mt') -
lang/perl/MENTA/trunk/app/static/style-sites.css
r23559 r24060 1 body { font-family: monospace } 2 h1 { padding: 0.5em } 1 body { font-family: monospace; } 2 .container { width: 640px; margin: auto;padding: 0 0 0 0; } 3 h1 { padding: 0.5em; margin-top: 0; margin-bottom: 0; } 4 .bodyContainer { background-color: white; padding-left: 4px; padding-right: 4px; } 3 5 4 6 table { -
lang/perl/MENTA/trunk/app/tmpl/footer.mt
r23986 r24060 1 </div> 1 2 <p><a href="<?= uri_for('index') ?>">トップにもどる</a></p> 3 </div> -
lang/perl/MENTA/trunk/app/tmpl/header.mt
r23986 r24060 3 3 <title><? if ($title) { ?><?= "$title - " ?><? } ?>MENTA</title> 4 4 <link rel="stylesheet" type="text/css" href="<?= docroot ?>static/style-sites.css"> 5 <div class="container"> 6 <h1><? if ($title) { ?><?= "$title - " ?><? } ?>MENTA</h1> 7 <div class="bodyContainer"> -
lang/perl/MENTA/trunk/lib/MENTA.pm
r24043 r24060 10 10 our $CARRIER; 11 11 our $STASH; 12 our $PLUGIN_LOADED; 12 13 our $BUILT = 0; 13 14 BEGIN { … … 416 417 sub load_plugin { 417 418 my $plugin = shift; 418 require_once($MENTA::BUILT ? "plugins/${plugin}.pl" : "plugins/${plugin}.pl"); 419 return if $MENTA::PLUGIN_LOADED->{$plugin}; 420 my $path = "plugins/${plugin}.pl"; 421 require $path; 422 $MENTA::PLUGIN_LOADED->{$plugin}++; 423 my $package = __menta_extract_package($path); 424 no strict 'refs'; 425 for ( 426 grep { /$plugin/o } 427 grep { defined &{"${package}::$_"} } 428 keys %{"${package}::"} 429 ) { 430 *{"main::$_"} = *{"${package}::$_"} 431 } 432 } 433 434 sub __menta_extract_package { 435 my $modulefile = shift; 436 open my $fh, '<', $modulefile or die "$modulefile を開けません: $!"; 437 my $in_pod = 0; 438 while (<$fh>) { 439 $in_pod = 1 if m/^=\w/; 440 $in_pod = 0 if /^=cut/; 441 next if ( $in_pod || /^=cut/ ); # skip pod text 442 next if /^\s*\#/; 443 444 /^\s*package\s+(.*?)\s*;/ and return $1; 445 } 446 return; 419 447 } 420 448 -
lang/perl/MENTA/trunk/plugins/counter.pl
r24048 r24060 1 use MENTA; 1 package MENTA::Plugin::Counter; 2 use MENTA::Plugin; 2 3 use Fcntl ':flock'; 3 4 use Carp; -
lang/perl/MENTA/trunk/plugins/mail.pl
r23559 r24060 1 # mb_send_mail('to@example.jp', 'サブジェクト', '本文', 'From: from@example.jp'); 2 # という風にして、送るとよい。 3 # TODO: ヘッダの処理とかが甘いので、なんとかする 4 # iso-2022-jp に MIME encode する? 5 6 use utf8; 1 package MENTA::Plugin::Mail; 2 use MENTA::Plugin; 7 3 use Symbol (); 8 4 … … 39 35 40 36 1; 37 __END__ 38 # mb_send_mail('to@example.jp', 'サブジェクト', '本文', 'From: from@example.jp'); 39 # という風にして、送るとよい。 40 # TODO: ヘッダの処理とかが甘いので、なんとかする 41 # iso-2022-jp に MIME encode する? 42 -
lang/perl/MENTA/trunk/plugins/sql.pl
r23992 r24060 1 # AUTHOR: tokuhirom, mattn 2 3 use strict; 4 use warnings; 5 use utf8; 1 package MENTA::Plugin::SQL; 2 use MENTA::Plugin; 6 3 use DBI; 7 4 … … 76 73 77 74 1; 75 # AUTHOR: tokuhirom, mattn
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)