{"id":1465,"date":"2017-01-28T20:15:00","date_gmt":"2017-01-28T12:15:00","guid":{"rendered":"http:\/\/ufqi.com\/blog\/?p=1465"},"modified":"2017-02-09T18:08:59","modified_gmt":"2017-02-09T10:08:59","slug":"gwa2-in-perl-first-release-2017-spring-festival","status":"publish","type":"post","link":"https:\/\/ufqi.com\/blog\/gwa2-in-perl-first-release-2017-spring-festival\/","title":{"rendered":"\u65b0\u6625\u6109\u5feb\uff01GWA2 in Perl \u521d\u7248\u53d1\u5e03"},"content":{"rendered":"<p>\u65b0\u6625\u6109\u5feb\uff012017\u5e74\u519c\u5386\u65b0\u5e74\u7b2c\u4e00\u5929\uff0cGWA2\u7684Perl\u7248\u672c\u5b8c\u6210\u9996\u4e2a\u7248\u672c\u3002<\/p>\n<p>\u8ddd\u79bb\u6211\u4eec\u5f00\u59cb\u5728<a href=\"https:\/\/ufqi.com\/blog\/gwa2-filea-and-perl\/\">2016\u5e7411\u6708\u4efd\u5f00\u59cb\u7b79\u5212GWA2\u7684Perl\u7248\u672c<\/a>\uff0c\u5927\u7ea62\u4e2a\u6708\u7684\u65f6\u95f4\u8fc7\u53bb\u4e86\uff0c\u8fd9\u671f\u95f4\uff0c\u6211\u4eec\u5bf9GWA2\u7684\u8f6f\u4ef6\u7f16\u7a0b\u6846\u67b6\u8bbe\u8ba1\u8fdb\u884c\u518d\u68b3\u7406\uff0c\u5728\u7ee7\u7eed\u5b8c\u5584GWA2 in PHP \u548c GWA2 in Java\u7684\u540c\u65f6\uff0c\u5f00\u53d1\u4e86GWA2\u7684Perl\u7248\u672c\u3002\u9010\u6e10\u5f62\u6210\u4e86GWA2\u7684\u53d1\u5c55\u8def\u7ebf\u56fe\u3002<\/p>\n<p><img loading=\"lazy\" class=\"\" src=\"https:\/\/ufqi.com\/blog\/wp-content\/uploads\/2016\/12\/gwa2-roadmap-201611-1024x588.jpg\" width=\"630\" height=\"362\" \/><br \/>\uff08GWA2\u7684\u53d1\u5c55\u8def\u7ebf\u56fe\uff09<\/p>\n<p>GWA2 in Perl \u7684\u9996\u4e2a\u7248\u672c\u652f\u6301\u4f7f\u7528Perl\u5728CLI\u6a21\u5f0f\u4e0b\u5bf9\u6570\u636e\u5e93\u7684\u64cd\u4f5c\uff0c\u8fd9\u662f\u4e00\u79cd\u5e38\u89c1\u7684\u5e94\u7528\u573a\u666f\u3002\u5176\u9a71\u52a8\u529b\u4ecd\u662f\u50cf\u6b64\u524d\u63cf\u8ff0\u7684\u90a3\u6837\uff1a<\/p>\n<blockquote>\n<p>\u201c\u6b64\u524d\u5728\u5f00\u53d1\u4eba\u6c11\u7f51\u7684\u4e00\u5957\u65b0\u95fb\u8f6c\u8f7d\u53d1\u73b0\u7cfb\u7edf\u65f6\u5c31\u591a\u6b21\u6709\u5ff5\u5934\u8981\u5bf9perl\u7684\u4ee3\u7801\u8fdb\u884c\u5c01\u88c5\u548c\u91cd\u7528\u3002\u6700\u8fd1\u53c8\u9047\u5230\u65b0\u7684\u4f7f\u7528perl\u7684\u5f00\u53d1\uff0c\u5c45\u7136\u8fd8\u8981\u4ecedbi\u5199\u8d77\uff0c\u8fd9\u592a\u4f4e\u6548\u7387\u4e86\u3002PHP\u7248\u672c\u7684gwa2\u7684\u547d\u4ee4\u884c\u6a21\u5f0f\u7684\u6210\u529f\u90e8\u7f72\u548c\u8fd0\u884c\u5f88\u8bf1\u4eba\uff0c\u4e8e\u662f\u5c31\u6709\u4e86perl\u7684gwa2\u7684\u5b9e\u73b0\u3002\u663e\u7136\uff0c\u8fd9\u53ea\u662f\u4e2a\u5f00\u59cb\u3002&#8230;.&#8221;<\/p>\n<\/blockquote>\n<p>\u5728\u8fdb\u884cPerl\u7248\u672c\u7684GWA2\u7684\u5b9e\u73b0\u65f6\uff0c\u4e5f\u6709\u5f88\u591a\u6311\u6218\u3002-Perl \u662f\u4e00\u95e8\u53e4\u8001\u800c\u6709\u5e74\u8f7b\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u8ddd\u4eca\u5df2\u670929\u5e74\u7684\u5386\u53f2\uff0c\u53d1\u5c55\u5386\u7a0b\u53ef\u8c13\u6f2b\u957f\uff0c\u800c\u4e14Perl\u662f\u677e\u6563\u7684\uff0c\u63d0\u5021\u591a\u6001\u548c\u4e30\u5bcc\uff0c\u63a8\u5d07\u4e00\u4e2a\u95ee\u9898\u603b\u6709\u591a\u4e2a\u89e3\u51b3\u529e\u6cd5\u7684\u6587\u5316\uff08TMTOMTD\uff09\u3002Perl\u5bf9\u9762\u5411\u5bf9\u8c61\uff08Object-Orienatied\uff09\u652f\u6301\u5e76\u4e0d\u662f\u5f88\u597d\uff0c\u9996\u5148\u5bf9\u4e00\u4e2a\u95ee\u9898\u662f\u662f\u5426\u5f15\u7528\u7b2c\u4e09\u65b9OO\u7684\u7c7b\u5e93\uff0c\u6bd4\u5982MOOSE\uff0c\u5f00\u59cb\u4e4b\u540e\u8fd8\u6709\u66f4\u591a\u7684\u652f\u6301\u4e0e\u9009\u62e9\uff0c\u8fd130\u5e74\u7684Perl\u7684\u53d1\u5c55\uff0c\u4f7f\u5176\u4e00\u65b9\u9762\u6709\u5927\u91cf\u7684\u6210\u719f\u7684\u7c7b\u5e93\uff0c\u53e6\u4e00\u65b9\u9762\u4e5f\u6709\u4e00\u4e9b\u5386\u53f2\u7684\u9057\u7559\u95ee\u9898\u3002<\/p>\n<p>\u5bf9\u4e8e\u8fd9\u4e9b\uff0cGWA2\u7684Perl\u7248\u672c\u53ea\u597d\u4fdd\u5b88\u5730\u4ece\u57fa\u672c\u529f\u80fd\u505a\u8d77\uff0c\u9762\u5411\u9700\u6c42\u9a71\u52a8\uff0c\u9884\u7559\u548c\u5f00\u653e\u76f8\u5e94\u63a5\u53e3\uff0c\u70b9\u6ef4\u79ef\u7d2f\uff0c\u4ee5\u5176\u6709\u6240\u6210\uff0c\u4e3aPerl\u793e\u533a\u6dfb\u7816\u52a0\u74e6\uff0c\u4e3aPerl\u5f00\u53d1\u63d0\u4f9b\u4e00\u4e2a\u5168\u5fc3\u7684\u89c6\u89d2\u3002<\/p>\n<p>Perl6\u6b63\u96c4\u5fc3\u52c3\u52c3\u5730\u8d70\u6765\uff0c\u5bf9\u6bd4\u592a\u8001\u7684Perl5\u7cfb\u5217\uff0cPerl6\u53c8\u663e\u5f97\u592a\u5e74\u8f7b\u3002\u5728\u8fd9\u4e2a\u8282\u9aa8\u773c\u4e0a\u63a8\u8fdbGWA2\u7684Perl\u7248\u672c\uff0c\u5fd0\u5fd1\u548c\u7ea0\u7ed3\u662f\u5e38\u6709\u7684\uff0c\u4e0d\u8fc7\u6211\u4eec\u8fd8\u662f\u63d0\u4f9b\u4e86\u4e00\u4e2aTutorial\u4f9b\u5f00\u53d1\u8005\u53c2\u8003\u3002<\/p>\n<p>Programs Written in GWA2 with Perl<\/p>\n<p>0. data<br \/>create table prefix_dummytbl(<br \/>\u00a0 \u00a0 id int(12) not null auto_increment, <br \/>\u00a0 \u00a0 iname char(255) not null default &#8221;,<br \/>primary key (id),<br \/>unique index uk1(iname));<\/p>\n<p>1. object<br \/>mod\/DummyModule.pm<br \/>use parent &#8216;inc::WebApp&#8217;;<\/p>\n<p>2. controller<br \/>ctrl\/dummy.pl<br \/>use mod::DummyModule;<br \/>\u00a0 \u00a0 $act=listen<br \/>\u00a0 \u00a0 $act=speak<br \/>\u00a0 \u00a0 $act=remember<br \/>&#8230;.<\/p>\n<p>3. view<br \/>view\/default\/dummy.html<\/p>\n<p>4. routing<br \/>\/path\/to\/perl \/path\/to\/project\/index.pl &#8220;?mod=dummy&amp;act=listen&amp;fmt=json&#8221;<\/p>\n<p><img src=\"https:\/\/ufqi.com\/blog\/wp-content\/uploads\/2016\/09\/gwa2-logo-201606.v2.png\" \/><\/p>\n<p><a href=\"http:\/\/ufqi.com\/naturedns\/search?q=-gwa2\" target=\"_blank\">-GWA2 \u662f\u4e00\u5957\u901a\u7528\u7f51\u7edc\u5e94\u7528\uff08\u8f6f\u4ef6\u7a0b\u5e8f\uff09\u67b6\u6784\u7cfb\u7edf<\/a>\uff0c\u57fa\u4e8e -GWA2 \u53ef\u4ee5\u8f7b\u4fbf\u6784\u5efa\u5404\u79cd\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f, \u5305\u62ec\u590d\u6742\u7684\u5728\u7ebf\u8d2d\u7269\u5546\u57ce\u3001 \u65c5\u6e38\u4ea4\u6613\u5e73\u53f0\u3001\u793e\u7fa4\u6216\u8005\u793e\u4ea4\u7f51\u7ad9\u548c\u65b0\u95fb\u8d44\u8baf\u7f51\u7ad9\u7b49\uff0c \u4e5f\u5305\u62ec\u5404\u79cd\u4f01\u4e8b\u4e1a\u5355\u4f4d\u7f51\u4e0a\u95e8\u6237\uff0c\u5728\u7ebf\u4ea4\u4e92\u53ca\u670d\u52a1\u4f5c\u4e1a\u7cfb\u7edf\u7b49. \u8fd8\u53ef\u4ee5\u5305\u62ec\u4e3aNativeApp\u505a\u670d\u52a1\u5668\u7aef\u652f\u6301, \u751a\u81f3\u662fWebApp\u7684\u5168\u90e8\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u65b0\u6625\u6109\u5feb\uff012017\u5e74\u519c\u5386\u65b0\u5e74\u7b2c\u4e00\u5929\uff0cGWA2\u7684Perl\u7248\u672c\u5b8c\u6210\u9996\u4e2a\u7248\u672c\u3002 \u8ddd\u79bb\u6211 &hellip; <a href=\"https:\/\/ufqi.com\/blog\/gwa2-in-perl-first-release-2017-spring-festival\/\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":1362,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[42,2],"tags":[86,23,152],"_links":{"self":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts\/1465"}],"collection":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/comments?post=1465"}],"version-history":[{"count":8,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts\/1465\/revisions"}],"predecessor-version":[{"id":1474,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts\/1465\/revisions\/1474"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/media\/1362"}],"wp:attachment":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/media?parent=1465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/categories?post=1465"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/tags?post=1465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}