Changeset 16061 for lang/actionscript

Show
Ignore:
Timestamp:
07/21/08 21:42:48 (4 months ago)
Author:
hoge1e3
Message:
 
Location:
lang/actionscript/todoshare
Files:
9 modified

Legend:

Unmodified
Added
Removed
  • lang/actionscript/todoshare/index.cgi

    r16016 r16061  
    2121       link("importObj.html","Import Objects(他のMySからHTTPで取得します)"), 
    2222      [h3,"File-related Menu"], 
    23        link("backupDB.html","Backup DB"), 
    24        link("restoreDB.html","Restore DB"), 
     23       link("backupDB.cgi","Backup DB"), 
     24       link("restoreDB.cgi","Restore DB"), 
    2525   ] 
    2626]); 
     
    3131  sub {  
    3232    my $p=shift; 
    33     $p->p([a,{href=>$href},$name])->brln; 
     33    $p->p([a(href=>$href),$name])->brln; 
    3434  }; 
    3535} 
  • lang/actionscript/todoshare/jsonDB.html

    r16016 r16061  
    11<html> 
    22<meta http-equiv="Content-type" content="text/html; charset=utf-8"> 
     3<title>Database Console</title> 
     4<script src="prototype.js"></script> 
     5<script> 
     6function exe() { 
     7   var cmd=$("cmd").value; 
     8   //alert(cmd); 
     9   new Ajax.Request("db.cgi", { 
     10                method: "put", 
     11                parameters: 'cmd='+encodeURI(cmd) , 
     12                onSuccess:function(httpObj){ 
     13                   //alert(httpObj); 
     14                   //alert(httpObj.responseText); 
     15                   $("res").value=httpObj.responseText; 
     16                }, 
     17                onFailure:function(httpObj) { 
     18                   $("res").value=httpObj.responseText; 
     19                } 
     20   }); 
     21} 
     22</script> 
    323<body> 
    424 
    525<form action="db.cgi" method="POST"> 
    6 <textarea rows=10 cols=40 name=cmd> 
    7 ["GET2",["content"], 
    8        {"content":["like","%る%"]} 
    9 ] 
     26<textarea rows=10 cols=40 id=cmd> 
     27["GET3",{ 
     28   "id":["*"],  
     29   "class":["*"],  
     30   "content":["like","%る%"] 
     31}] 
    1032</textarea> 
     33<button onclick="exe();return false;" onsubmit="return false;">AJax</button> 
    1134<input type=submit> 
     35<textarea rows=10 cols=40 id=res></textarea> 
    1236</form> 
    13  
    1437<BR> 
    1538<textarea rows=10 cols=40 name=cmd> 
     
    2043  {"strength":"1", "type":"animal"} 
    2144] 
     45["INSERT3", 
     46  {"strength":"1", "type":"animal", "content":"ごりら"} 
     47 
     48] 
     49["GET2",["content"], 
     50       {"content":["like","%る%"]} 
     51] 
     52["MAKEREL","りんご","色","赤"] 
    2253</textarea></br> 
    23  
    24  
    25 <form action="test/utf8.cgi" method="POST"> 
    26 <textarea rows=10 cols=40 name=str>%る%</textarea> 
    27 <input type=submit> 
    28  
    2954</body></html> 
  • lang/actionscript/todoshare/perl/ArrayUtil.pm

    r16014 r16061  
    22 
    33use strict; 
    4 our @EXPORT = qw(uniq getColumn array); 
     4our @EXPORT = qw(uniq getColumn array filter isArray); 
    55use base qw(Exporter); 
    66 
     
    1616} 
    1717 
     18sub isArray { 
     19   my $a=shift; 
     20   my $r="$a "; 
     21   (ref $a) and ($r =~ /ARRAY/); 
     22} 
     23sub filter { 
     24   my $a=shift; 
     25   my $sub=shift; 
     26   my $res=[]; 
     27   &each($a,sub { 
     28     my $e=shift; 
     29     push @$res,$e if (&{$sub}($e)); 
     30   }); 
     31   bless $res; 
     32}  
    1833sub array { 
    1934   bless $_[0]; 
     35} 
     36sub join { 
     37   my $a=shift; 
     38   my $sep=shift; 
     39   join $sep, @$a; 
    2040} 
    2141sub getColumn { 
  • lang/actionscript/todoshare/perl/Html.pm

    r16014 r16061  
    11package stream; 
     2use strict; 
    23 
    34sub new { 
     
    2324       } 
    2425       return; 
     26    } 
     27    #print (ref $tag); 
     28    if ((ref $tag) eq "CODE") { 
     29       my @args=@$c; 
     30       $args[0]=$t; 
     31       return &{$tag}(@args); 
    2532    } 
    2633    $t->out("<$tag ");  
     
    8087 
    8188package Html; 
     89use strict; 
    8290 
    8391our @EXPORT = qw(header p brln); 
     
    8593 
    8694sub header { 
    87   print "Content-type: text/html; charset=utf-8\n\n"; 
     95  my %args=(type=>"text/html" ,@_); 
     96  print "Content-type: $args{type}; charset=utf-8\n\n"; 
    8897} 
    8998sub brln { 
     
    91100} 
    92101 
    93 sub p { 
    94   my $c=shift; 
     102sub stdoutStream { 
    95103  new stream(sub { 
    96104      my $s=shift;  
    97105      print $s; 
    98   })->p($c); 
     106  }); 
     107} 
     108sub p { 
     109  my $c=shift; 
     110  &stdoutStream->p($c); 
    99111} 
    1001121; 
  • lang/actionscript/todoshare/perl/HtmlTag.pm

    r16014 r16061  
    118118); 
    119119use base qw(Exporter); 
    120  
    121 sub a {q(a);} 
    122 sub abbr {q(abbr);} 
    123 sub acronym {q(acronym);} 
    124 sub address {q(address);} 
    125 sub applet {q(applet);} 
    126 sub area {q(area);} 
    127 sub b {q(b);} 
    128 sub base {q(base);} 
    129 sub basefont {q(basefont);} 
    130 sub bdo {q(bdo);} 
    131 sub bgsound {q(bgsound);} 
    132 sub big {q(big);} 
    133 sub blink {q(blink);} 
    134 sub blockquote {q(blockquote);} 
    135 sub body {q(body);} 
    136 sub br {q(br);} 
    137 sub button {q(button);} 
    138 sub caption {q(caption);} 
    139 sub center {q(center);} 
    140 sub cite {q(cite);} 
    141 sub code {q(code);} 
    142 sub col {q(col);} 
    143 sub colgroup {q(colgroup);} 
    144 sub comment {q(comment);} 
    145 sub dd {q(dd);} 
    146 sub del {q(del);} 
    147 sub dfn {q(dfn);} 
    148 sub dir {q(dir);} 
    149 sub div {q(div);} 
    150 sub dl {q(dl);} 
    151 sub dt {q(dt);} 
    152 sub em {q(em);} 
    153 sub embed {q(embed);} 
    154 sub fieldset {q(fieldset);} 
    155 sub font {q(font);} 
    156 sub form {q(form);} 
    157 sub frame {q(frame);} 
    158 sub frameset {q(frameset);} 
    159 sub h1 {q(h1);} 
    160 sub h2 {q(h2);} 
    161 sub h3 {q(h3);} 
    162 sub h4 {q(h4);} 
    163 sub h5 {q(h5);} 
    164 sub h6 {q(h6);} 
    165 sub head {q(head);} 
    166 sub hr {q(hr);} 
    167 sub html {q(html);} 
    168 sub i {q(i);} 
    169 sub iframe {q(iframe);} 
    170 sub ilayer {q(ilayer);} 
    171 sub img {q(img);} 
    172 sub input {q(input);} 
    173 sub ins {q(ins);} 
    174 sub isindex {q(isindex);} 
    175 sub kbd {q(kbd);} 
    176 sub keygen {q(keygen);} 
    177 sub label {q(label);} 
    178 sub layer {q(layer);} 
    179 sub legend {q(legend);} 
    180 sub li {q(li);} 
    181 sub link {q(link);} 
    182 sub listing {q(listing);} 
    183 sub map {q(map);} 
    184 sub marquee {q(marquee);} 
    185 sub menu {q(menu);} 
    186 sub meta {q(meta);} 
    187 sub multicol {q(multicol);} 
    188 sub nextid {q(nextid);} 
    189 sub nobr {q(nobr);} 
    190 sub noembed {q(noembed);} 
    191 sub noframes {q(noframes);} 
    192 sub nolayer {q(nolayer);} 
    193 sub noscript {q(noscript);} 
    194 sub object {q(object);} 
    195 sub ol {q(ol);} 
    196 sub optgroup {q(optgroup);} 
    197 sub option {q(option);} 
    198 sub p {q(p);} 
    199 sub param {q(param);} 
    200 sub plaintext {q(plaintext);} 
    201 sub pre {q(pre);} 
    202 sub q {q(q);} 
    203 sub rb {q(rb);} 
    204 sub rp {q(rp);} 
    205 sub rt {q(rt);} 
    206 sub ruby {q(ruby);} 
    207 sub s {q(s);} 
    208 sub samp {q(samp);} 
    209 sub script {q(script);} 
    210 sub select {q(select);} 
    211 sub server {q(server);} 
    212 sub small {q(small);} 
    213 sub spacer {q(spacer);} 
    214 sub span {q(span);} 
    215 sub strike {q(strike);} 
    216 sub strong {q(strong);} 
    217 sub style {q(style);} 
    218 sub sub {q(sub);} 
    219 sub sup {q(sup);} 
    220 sub table {q(table);} 
    221 sub tbody {q(tbody);} 
    222 sub td {q(td);} 
    223 sub textarea {q(textarea);} 
    224 sub tfoot {q(tfoot);} 
    225 sub th {q(th);} 
    226 sub thead {q(thead);} 
    227 sub title {q(title);} 
    228 sub tr {q(tr);} 
    229 sub tt {q(tt);} 
    230 sub u {q(u);} 
    231 sub ul {q(ul);} 
    232 sub var {q(var);} 
    233 sub wbr {q(wbr);} 
    234 sub xmp {q(xmp);} 
     120use Html; 
     121sub closure($@) { 
     122  my $tag=shift; 
     123  my %params=@_; 
     124  return sub { 
     125    my $t=shift; 
     126    $t->out("<$tag "); 
     127    while (my ($k,$v)= each %params) { 
     128       $t->out(&stream::sym($k)."=".&stream::attr($v)." " );  
     129    } 
     130    if (@_>0) { 
     131      $t->out(">"); 
     132      for (@_) { 
     133         $t->p($_); 
     134      } 
     135      $t->out("</$tag>"); 
     136    } else { 
     137      $t->out("/>"); 
     138    } 
     139  }; 
     140} 
     141sub a { closure q(a),@_;} 
     142sub abbr { closure q(abbr),@_;} 
     143sub acronym { closure q(acronym),@_;} 
     144sub address { closure q(address),@_;} 
     145sub applet { closure q(applet),@_;} 
     146sub area { closure q(area),@_;} 
     147sub b { closure q(b),@_;} 
     148sub base { closure q(base),@_;} 
     149sub basefont { closure q(basefont),@_;} 
     150sub bdo { closure q(bdo),@_;} 
     151sub bgsound { closure q(bgsound),@_;} 
     152sub big { closure q(big),@_;} 
     153sub blink { closure q(blink),@_;} 
     154sub blockquote { closure q(blockquote),@_;} 
     155sub body { closure q(body),@_;} 
     156sub br { closure q(br),@_;} 
     157sub button { closure q(button),@_;} 
     158sub caption { closure q(caption),@_;} 
     159sub center { closure q(center),@_;} 
     160sub cite { closure q(cite),@_;} 
     161sub code { closure q(code),@_;} 
     162sub col { closure q(col),@_;} 
     163sub colgroup { closure q(colgroup),@_;} 
     164sub comment { closure q(comment),@_;} 
     165sub dd { closure q(dd),@_;} 
     166sub del { closure q(del),@_;} 
     167sub dfn { closure q(dfn),@_;} 
     168sub dir { closure q(dir),@_;} 
     169sub div { closure q(div),@_;} 
     170sub dl { closure q(dl),@_;} 
     171sub dt { closure q(dt),@_;} 
     172sub em { closure q(em),@_;} 
     173sub embed { closure q(embed),@_;} 
     174sub fieldset { closure q(fieldset),@_;} 
     175sub font { closure q(font),@_;} 
     176sub form { closure q(form),@_;} 
     177sub frame { closure q(frame),@_;} 
     178sub frameset { closure q(frameset),@_;} 
     179sub h1 { closure q(h1),@_;} 
     180sub h2 { closure q(h2),@_;} 
     181sub h3 { closure q(h3),@_;} 
     182sub h4 { closure q(h4),@_;} 
     183sub h5 { closure q(h5),@_;} 
     184sub h6 { closure q(h6),@_;} 
     185sub head { closure q(head),@_;} 
     186sub hr { closure q(hr),@_;} 
     187sub html { closure q(html),@_;} 
     188sub i { closure q(i),@_;} 
     189sub iframe { closure q(iframe),@_;} 
     190sub ilayer { closure q(ilayer),@_;} 
     191sub img { closure q(img),@_;} 
     192sub input { closure q(input),@_;} 
     193sub ins { closure q(ins),@_;} 
     194sub isindex { closure q(isindex),@_;} 
     195sub kbd { closure q(kbd),@_;} 
     196sub keygen { closure q(keygen),@_;} 
     197sub label { closure q(label),@_;} 
     198sub layer { closure q(layer),@_;} 
     199sub legend { closure q(legend),@_;} 
     200sub li { closure q(li),@_;} 
     201sub link { closure q(link),@_;} 
     202sub listing { closure q(listing),@_;} 
     203sub map { closure q(map),@_;} 
     204sub marquee { closure q(marquee),@_;} 
     205sub menu { closure q(menu),@_;} 
     206sub meta { closure q(meta),@_;} 
     207sub multicol { closure q(multicol),@_;} 
     208sub nextid { closure q(nextid),@_;} 
     209sub nobr { closure q(nobr),@_;} 
     210sub noembed { closure q(noembed),@_;} 
     211sub noframes { closure q(noframes),@_;} 
     212sub nolayer { closure q(nolayer),@_;} 
     213sub noscript { closure q(noscript),@_;} 
     214sub object { closure q(object),@_;} 
     215sub ol { closure q(ol),@_;} 
     216sub optgroup { closure q(optgroup),@_;} 
     217sub option { closure q(option),@_;} 
     218sub p { closure q(p),@_;} 
     219sub param { closure q(param),@_;} 
     220sub plaintext { closure q(plaintext),@_;} 
     221sub pre { closure q(pre),@_;} 
     222sub q { closure q(q),@_;} 
     223sub rb { closure q(rb),@_;} 
     224sub rp { closure q(rp),@_;} 
     225sub rt { closure q(rt),@_;} 
     226sub ruby { closure q(ruby),@_;} 
     227sub s { closure q(s),@_;} 
     228sub samp { closure q(samp),@_;} 
     229sub script { closure q(script),@_;} 
     230sub select { closure q(select),@_;} 
     231sub server { closure q(server),@_;} 
     232sub small { closure q(small),@_;} 
     233sub spacer { closure q(spacer),@_;} 
     234sub span { closure q(span),@_;} 
     235sub strike { closure q(strike),@_;} 
     236sub strong { closure q(strong),@_;} 
     237sub style { closure q(style),@_;} 
     238sub sub { closure q(sub),@_;} 
     239sub sup { closure q(sup),@_;} 
     240sub table { closure q(table),@_;} 
     241sub tbody { closure q(tbody),@_;} 
     242sub td { closure q(td),@_;} 
     243sub textarea { closure q(textarea),@_;} 
     244sub tfoot { closure q(tfoot),@_;} 
     245sub th { closure q(th),@_;} 
     246sub thead { closure q(thead),@_;} 
     247sub title { closure q(title),@_;} 
     248sub tr { closure q(tr),@_;} 
     249sub tt { closure q(tt),@_;} 
     250sub u { closure q(u),@_;} 
     251sub ul { closure q(ul),@_;} 
     252sub var { closure q(var),@_;} 
     253sub wbr { closure q(wbr),@_;} 
     254sub xmp { closure q(xmp),@_;} 
    235255 
    236256 
  • lang/actionscript/todoshare/perl/Obj.pm

    r16014 r16061  
    55use DBI; 
    66use ArrayUtil; 
     7#use JSON2; 
    78 
    89our @EXPORT = qw(any); 
     
    2223my $any=["*"]; 
    2324sub any{$any;} 
     25sub isAny{ 
     26  my $o=shift; 
     27  (isArray($o) and $o->[0] eq "*"); 
     28} 
    2429sub newID { 
    2530  my $prefix=shift; 
     
    5863                $sth->finish; 
    5964        return array($res);              
     65    } elsif ($cmd->[0] eq "UPDATE") { 
     66        # ["UPDATE",$table,$set,$where] 
     67        my $table=$cmd->[1]; 
     68        my $set  =$cmd->[2]; 
     69        my $where=$cmd->[3]; 
     70        my $query="update ".&escapeSymbol($table)." set "; 
     71        return ["OK"] if ((keys %$set)<1); 
     72        my @sets; 
     73        for (keys %$set) { 
     74          my $key=$_; 
     75          push @sets, ( 
     76            &escapeSymbol($key)."=" &escapeLiteral($set->{$key}) 
     77          );         
     78        } 
     79        $query.=join ",",@sets; 
     80        $query.=" where "; 
     81        for (keys  
     82         
    6083        } elsif ($cmd->[0] eq 'POST' or $cmd->[0] eq 'PUT' ) { 
    6184            my $data=$cmd->[1]; 
     
    108131            if ($res) { $res=(["OK",$objectID, $query ]); } 
    109132            else { $res=(["Fail",$query,$sth->errstr]); } 
     133            $sth->finish; 
     134        return array($res);              
     135        } elsif ($cmd->[0] eq 'INSERT3') { 
     136        # ["INSERT3", %$properties ,$idNameOvr ]  
     137        # -> ["OK", %$properties ] 
     138            my $properties=$cmd->[1]; 
     139                my $idNameOvr=$cmd->[2]; 
     140            $idNameOvr = $idName unless ($idNameOvr); 
     141            die ("1st arg not hash  :$properties") unless ((ref $properties) eq "HASH");  
     142            if ($properties->{$idNameOvr}) { 
     143                # update 
     144                my $objectID=$properties->{$idNameOvr}; 
     145                my $fields=filter (keys $properties),sub {$_[0] ne $idNameOvr}; 
     146                for (@$fields) { 
     147                   return &exe(["UPDATE",$relName, 
     148                          {value=>$properties->{$_}}, 
     149                          {obj=>$objectID, name=>$_} 
     150                   ]); 
     151                } 
     152            } else { 
     153                # insert 
     154                    my $objectID=&newID; 
     155                    my $values=&values2($objectID, $properties); 
     156                    $properties->{$idNameOvr}=$objectID; 
     157                    my $query =qq( 
     158                      insert into @{[&escapeSymbol($relName)]} $values ; 
     159                    ); 
     160                } 
     161                my $sth=$db->prepare($query); 
     162            my $res=$sth->execute; 
     163                &log($cmd,$query); 
     164            if ($res) { $res=["OK",$objectID, $query ]; } 
     165            else { die( "FAILED $query : $sth->errstr"); } 
    110166            $sth->finish; 
    111167        return array($res);              
     
    178234                $sth->finish; 
    179235                return array($res); 
     236        } elsif ($cmd->[0] eq 'GET3') { 
     237        # ["GET3", {a: b , c: d}, idNameopt ] 
     238           my $tmpl=$cmd->[1]; 
     239           my $idNameOvr=$cmd->[2]; 
     240           $idNameOvr = $idName unless ($idNameOvr); 
     241            
     242       my $fields = filter([keys %$tmpl],sub { 
     243          $_[0] ne $idNameOvr; 
     244       }); 
     245       #print STDERR ("\n".toJSON($fields)); 
     246        
     247           my $prim = $fields->[0]; 
     248           my $prime=&escapeSymbol($prim); 
     249           my $query="select $prime.obj as $idNameOvr, ".( 
     250                join ",", map &escapeSymbol($_).".val as ".&escapeSymbol($_) ,@{$fields} 
     251           )."\n from $relName $prime "; 
     252           my $prev=$prim; 
     253           shift @{$fields}; 
     254           for my $f (@{$fields}) { 
     255              $query .=  
     256                "\n inner join $relName ".&escapeSymbol($f). 
     257                " on ".&escapeSymbol($prev).".obj=".&escapeSymbol($f).".obj \n" 
     258              ; 
     259              $prev=$f; 
     260           } 
     261           unshift @{$fields}, $prim ; 
     262           my $wheres=[]; 
     263           for (@{$fields}) { 
     264              push @{$wheres}, ( 
     265                 &escapeSymbol($_).".name=".&escapeLiteral($_) 
     266              ); 
     267           } 
     268           while (my ($k,$v)=each %{$tmpl}) { 
     269              next if (isAny($v)); 
     270              if ($k eq $idNameOvr) { 
     271                 push @{$wheres}, &whereElem ("$prim.obj", $v); 
     272              } else { 
     273                 push @{$wheres}, &whereElem ("$k.val",$v); 
     274              } 
     275           } 
     276            
     277           $query .= "\n where "; 
     278           $query .= join " and \n", @{$wheres}   ; 
     279           #print "$query\n";        
     280            
     281            my $sth = $db->prepare($query); 
     282                my $eres=$sth->execute; 
     283                &log($cmd,$query); 
     284                if (!$eres) {  
     285                    my $exception="Exception ,$query, ".$sth->errstr; 
     286                    $sth->finish; 
     287                    die ($exception); 
     288                    return array($eres); 
     289                } 
     290                my $num_rows = $sth->rows; 
     291                my $res=[]; 
     292                for (my $i=0; $i<$num_rows; $i++) { 
     293                    my $a = $sth->fetchrow_hashref; 
     294                    push @{$res}, $a; 
     295                } 
     296                $sth->finish; 
     297                return array($res); 
    180298        } elsif ($cmd->[0] eq 'DELETE2') { 
    181299        # ["DELETE2", objID] 
     
    291409sub log { 
    292410  my ($cmd,$query)=@_; 
    293   print STDERR $query; 
     411  print STDERR "\n$query"; 
    294412  push @logBuf,$query; 
    295413} 
  • lang/actionscript/todoshare/swkText.cgi

    r16016 r16061  
    3434  return unless ($in->{cmd}); 
    3535  my $p=shift; 
    36   my $objs=&Obj::exe ( 
     36  my $findVal=&Obj::exe ( 
    3737     ["FINDREL", any, any, ["like", "%".$in->{cmd}."%"]] 
    38   )->getColumn("obj")->uniq; 
     38  )->getColumn("obj"); 
     39  my $findName=&Obj::exe ( 
     40     ["FINDREL", any, ["like", "%".$in->{cmd}."%"],any] 
     41  )->getColumn("obj"); 
     42  my $findObj=&Obj::exe ( 
     43     ["FINDREL", ["like", "%".$in->{cmd}."%"],any,any] 
     44  )->getColumn("obj"); 
     45  my $objs=uniq([@$findVal,@$findName,@$findObj]); 
    3946   
     47  my %disped; 
    4048  &Obj::exe ( 
    4149     ["GET2", ["content"],{id=>["in",@$objs]} ] 
     
    4351     sub { 
    4452        $p->p("$_->{id} - $_->{content}") 
    45           ->brln;       
     53          ->brln;           
     54        $disped{$_->{id}}=1; 
    4655     } 
    4756  ); 
     57  $objs->each(sub { 
     58    my $obj=shift; 
     59    return if ($disped{$obj}); 
     60    $p->p("$obj")->brln; 
     61  }); 
    4862   
    4963  #$p->p(["pre",&Obj::getLog])->ln; 
  • lang/actionscript/todoshare/test/test.pl

    r16014 r16061  
    11#!/usr/bin/perl 
    22 
    3 package main; 
    4 use pkg; 
     3#package main; 
     4#use pkg; 
     5BEGIN{ 
     6  push @INC,"../perl"; 
     7} 
    58use strict; 
     9use Html; 
     10use HtmlTag; 
    611 
    7 print (b a b (a b),5);  
     12&Html::p ([a(href=>"test.html")]); 
    813 
     14#print (b a b (a b),5);  
    915 
     16#sub a { 
     17#  my %args=("aho"=>"tensai",@_); 
     18#  print $args{"aho"}; 
     19#} 
     20#&a(aho=>"baka"); 
     21 
  • lang/actionscript/todoshare/todo.cgi

    r16014 r16061  
    88use strict; 
    99use Html; 
     10use HtmlTag; 
    1011use JSON; 
    1112use CGI::Carp qw(fatalsToBrowser); 
     
    7273        my $q; 
    7374        $c->p( 
    74             ["form", {action=>$script,method=>"POST"}, 
     75            [form(action=>$script,method=>"POST"), 
    7576              "内容:",$br, 
    76               ["input",{type=>"text" , name=>"todoName",value=>$in->{todoName}}],$br, 
     77              input(type=>"text" , name=>"todoName",value=>$in->{todoName}),$br, 
    7778              "場所(条件):",$br, 
    78               ["select",{name=>"when"}, 
     79              [select(name=>"when"), 
    7980                  sub { 
    8081                     my $out=shift;