Perl
社å ã§ä½¿ç¨ãã¦ããCGIã«ãæ¨æ¥ããã¨ã©ã¼å ±åãç¸æ¬¡ãããã«ãªã£ãã æ²ç¤ºæ¿ã®å¤ç¨®ã®ãããªã¹ã¯ãªãããªã®ã ããæ¸ãè¾¼ã¿æã«ã¨ã©ã¼ãåºã¦æ稿å®äºã§ããªãã¨ããã ããæãä»ãåå 㯠CGIã«ãã°ããã ãã°ãã¡ã¤ã«ã®ã¢ã¯ã»ã¹æ¨©ã«åé¡ããã ãµã¼ãã®åä½â¦
æ¬æ¥ããWinãµã¼ãã¸ç§»è¨äºå®ã ã£ãCGIãã³ãã¼ä¸ã«ç ´æããããããæ¥é½å¤ããã¡ã¤ã«ããããã¯ã¢ãããããåä½ããªããªã£ãã 5æéã°ããæ ¼éãã漸ãçªãæ¢ããåå ã¯ãã¡ã¤ã«ããã¯ã«ç¨ããSymlinké¢æ°ã ã£ãããããããã·ã³ããªãã¯ãªã³ã¯ããµãã¼ãâ¦
ãåããå¿ è¦ããã£ãã®ã§ActivePerlãã¤ã³ã¹ãã¼ã«ãå®è¡æ¨©ã®è¨å®ããã¦ã¿ãããã ããã©ãã«ãããã«ãåããªããããã³ããã§perl -vããçµæã¯æ£å¸¸ã ã£ãã®ã§Perlã¨ãã¦ã®åä½ã«åé¡ã¯ãªãã®ã ããhttpçµç±ã§ã®ã¢ã¯ã»ã¹æã«å®è¡æ¨©ããªãã®ã§cgiãã³ã¼ã«â¦
ãã£ã¨åã«ä½ã£ãæ½è¨äºç´ç®¡çCGIãããã¾ã§ã¯äºç´ã®ã¿ã§ãã£ã³ã»ã«ã¯é£çµ¡ãè²°ã£ã¦ãã°ãæ¸ãæãã¦ããã®ã ãããµã¼ãã®å ¥ãæ¿ããæ©ã«ä»æ§ãä¸é¨å¤æ´ããã å½åã¯ä¸æãªURLãè¨è¼ããã¡ã¼ã«ã§æ¬äººç¢ºèªãåãä»çµã¿ãèãã¦ããããã¡ã¼ã«éç¥ãæ¢ãã¦ãã¹â¦
諸äºæ ã«ãã社å ã§Perlå®è¡ç°å¢ãä½ãå¿ è¦ã«è¿«ããããåä½ãããã®ã¯ç°¡åãªCGiãªã®ã§AN HTTPD+ActivePerlã§ã ã©ã¡ããã¤ã³ã¹ãã¼ã«ã¯å®äºãã¦ããã127.0.0.1ã§ãã¹ãç¨HTMLã®è¡¨ç¤ºãæ»ããªããããåãé層ã«ç½®ããCGIã¯åããªãããªãã§ã ã å®è¡æ¨©éãâ¦
ç¡æãªã³ã¯ãç¦æ¢ãããã®ã«ãã®æ段ãæããªã人ã®ããã«ãã¡ãã£ã¨ããCGIãæ¸ãã¦ã¿ãã ãããªã«é£ãããã®ã§ã¯ãªãã¦ãåã«HTMLãã¡ã¤ã«ãèªã¿è¾¼ãã§è¡¨ç¤ºããã ãã®ãã®ã ãããã®éãªãã¡ã©ããã§ãã¯ãã¦ç¦æ¢æå®URLããã®ã¢ã¯ã»ã¹ãå¼¾ãããç´ãªã³ã¯â¦
ToDoãªã¹ãã¬ã´ã§ã«ã§ç®¡çå¯è½ãªã¬ã³ããã£ã¼ããä½ããè¨ç»ãæåãããã£ã¡ãå·¥æ°ãè¦ç©ã£ã¦ç¶¿å¯ãªã¹ã±ã¸ã¥ã¼ã«ç®¡çã§ããªããããªç¨éã§ãããã§ãã¬ã³ããã£ã¼ãå¿ é ãªå ´åã«ããç°¡åã«äºå®ãå¤æ´å¯è½ãªã¬ã³ããã£ã¼ãããç¨æãã¦ã¯ã©ãããã¨ããçºæ³â¦
å ç¨ããæ£è¦è¡¨ç¾ã§aã¿ã°ã®hrefå ãç½®ãæ¿ããæ¹æ³ã模索ãã¦ããã®ã ããhrefããåã«ä»ã®å±æ§ãããç¶æ³ãå¦çã§ããªãã
以åããæã ã¡ããã¡ããã¨å¼ã£ã¦ããããã¹ãå¤æã¹ã¯ãªããã å½åãæ§æ¼¢åæ§ããªå¤æè¾æ¸ã丸谷åããå©ç¨ããããã®ã½ããã¦ã§ã¢ãæå¸è¶ããOS Xé対å¿ã§ãã£ãããã«è£½ä½ãæãç«ã£ãã®ã ããã©ããæ¤ã®è¾æ¸ãã®ç¸æ§ãæªããããæååãã解æ¶ã§ããâ¦
ã©ãããã°ã«ã¼ãããã©ã«ãã¹ã¿ã¤ã«ã¸ã®zen-makieé©ç¨æã«ã°ã«ã¼ãã«ã¬ã³ãã¼ãé»åé»èæ¯ã«ãªã£ã¦ãã¾ãã¨ããåé¡ããããããã¨ãããã¨ã§ãããè¨ãã°ã°ã«ã¼ãã®åä½ãã¹ãã失念ãã¦ãããã¨ã«æ°ä»ãæ©éãã¹ããéå§ããã以åä½ã£ã確èªç¨CGIãä½æ â¦
ã¡ã¼ã«ã¢ãã¬ã¹ã®ã@ããåã ãããã§ãã¯ããããã®æ£è¦è¡¨ç¾ã«è¦å¿ããã 使ããã¦ããæåã¯[a-z]ã¨-ã ãã§ãããã¨ã解ã£ã¦ããã®ã§ãif ( $mail =~ /[^-[a-z] ]/ )ã¨æ¸ãããæãããã«åããªãã å®è¡çµæãè¦è¦åãããã¨s/([^-[a-z] ])/<em>\1<\/em>/ã¨ã</em>â¦
CSSã°ã«ã¼ãã®ãã¼ãä½æã³ã³ãã¹ãç¨ã«ãã¹ã¿ã¤ã«ã·ã¼ãé©ç¨æã®ã¤ã¡ã¼ã¸ã確èªããããã®CGIãä½ã£ãã®ã ããã©ãããªããããã¼è²ãåãæ¿ããããããã«ãããã¨æãã¤ã¤è²ã³ã¼ãç½®ãæãé¨åã§æ«ææ°å³ããã¹ã¦ã®ãããã¼ã«ã©ã¼ã表示ãã¦ã¯è©²å½ããè²â¦
ã¤ã³ããã¯ã¹ãã¡ã¤ã«ãèªã¿è¾¼ãã§ã¡ãã¥ã¼ãèªåçæããæ©è½ã追å ãããä»ããé層ã¸è³ãã«ã¼ããclass="select"ã¨ããulã«ããå¤éãªã¹ãæ§é ã ãã¼ã«ã«ã§ã¯åä½ãããä½æ ããµã¼ãã¼ã§ã¯æ©è½ããªãããã®ãµã¼ãã¼ã¯ãtxtãã¨ãããã£ã¬ã¯ããªã«ç½®ããCâ¦
ãã¡ã¤ã«ã®ä½æ/å¤æ´/åé¤æã®ã¤ã³ããã¯ã¹æ´æ°å¦çã«å°ã æ©ãã§ããããèãã¦ã¿ãã°ä½ããã®å¤æ´ããã£ãæã«ã¤ã³ããã¯ã¹ãã¡ã¤ã«ãæ°ãã«ä½ãã°ãä¸ã å¤æ´ç®æãæ¢ãã¦æ¸ãæããªãã¦ã常ã«ææ°ã®ç¶æ ãä¿ããããã¨ã«ãªãã ã¨ã¬ã¬ã³ããªè§£ã§ã¯ãªãããâ¦
id:fumineã«æ票ãã©ã¼ã ã®è¨ç½®ãé ¼ã¾ããã®ã§ããªã¼ã®CGIã¹ã¯ãªãããæ¢ãããã©ãã使ãåæããã¾ãå®ãããªããããããã®ã¯å¯è½ãªéãè¨å®ãç°¡åãªæ¹ãããã 大ãã¦é£ãããã®ã§ã¯ãªãã®ã§ã¡ãã£ã¨ä½ã£ã¦ã¿ãã é¸æè¢ã®æ°ã ãè¨é²ãã¡ã¤ã«ãä½ãã1è¡â¦
BlogPetã®IDã¯åè§è±æ°ã®ã¿ã ããã¨ãã決ããã¡ã§BlogPetã¿ã°âã¯ã¦ãªã¢ã¸ã¥ã¼ã«å¤æã¹ã¯ãªãã*1ãä½ã£ã¦ã¿ãããã®ããã ãã«ç»é²ããæ°ã«ãªããªãã£ãã®ã§å®éã®IDã§ãã¹ããã¦ã¯ããªããåä½ã«åé¡ããã°ãç¥ããä¸ããã *1:ç´ã«ãªã³ã¯ããã¨è¡¨ç¤ºã許å¯â¦
åãæ¢ãããã¢ç¨ã«ç°¡æCMSããµã¼ãã«è¨ç½®ãã¦ã¿ããBasicèªè¨¼ãããããã©ã«ããç¨æããä¸ã«ä¸å¼ãã»ããã 表示ããã¹ãããã¨ãèªè¨¼ãã©ã«ãç´ä¸ã®è¡¨ç¤ºç¨CGIã¯æ£å¸¸åä½ãããããã®ä¸ã®ãã©ã«ãã«ç½®ããç·¨éç¨CGIã500ã¨ã©ã¼ãè¿ãã念ã®ãããã¼ããã·â¦
å½åè¨ç½®ã®æéãèãã¦è¡¨ç¤ºããç·¨éã¾ã§å ¨æ©è½ãã²ã¨ã¤ã«çºãã¦ããããã»ãã¥ãªãã£ä¸ã®çç±ãã表示é¨åã¨ç·¨éé¨åãåé¢ãããã¨ã«ãããããã«ãããã¼ã¿ãã©ã«ãã«ã¢ã¯ã»ã¹å¶éããããã°ï¼ååã¨ãã¦ï¼ç®¡çè 以å¤ã«è¦ããããã¨ã¯ãªããªãå®å ¨æ§ã¯åâ¦
å½¢æ ç´ è§£æãªã©ã®è¤éãªå¦çã¯å ãè§ãæ©æ¢°çã«å ¥åãããæååã¨ãã¼ã¿ãã¼ã¹å®å ¨ä¸è´ã®å ´åã®ã¿è¿äºãè¿ããããªäººå·¥ç¡è½ãªãç°¡åã ãããã¨ä½ãå§ãã¦ã¿ãã ããèãã¦ã¿ãã°å ¥åå 容ã®å¦ç¿ã¨è¿çã ãã§ãªããããã¾ã§ã®ããåãå±¥æ´ãæ®ããã°ä¼è©±ã®æµâ¦
ä¸çªé¢åãªãããã«å·®ãæãã£ããè¤æ°ã¦ã¼ã¶ã¼ã§ã®å©ç¨ãèããå ´åããã£ã¬ã¯ããªæ¯ã®ã¦ã¼ã¶ã¼ç®¡çã¯å¿ é ã§ããï¼ã¾ããã£ã¬ã¯ããªæ¯ã«å¥ã«CGIè¨ç½®ãã¦ãè¯ããã ãã©ãï¼ãããã¦ãã¡ã¤ã«ä½æã¨ã¢ãããã¼ãã¯ã»ãã¥ãªãã£ä¸ã®ç©´ã«ãªããããªãï¼ä¸å¿å é¨â¦
è¤æ°ã®äººéã管çã«æºãããã¨ãèãã¦ãã£ã¬ã¯ããªæ¯ã«ã¦ã¼ã¶ã¼IDã¨ãã¹ã¯ã¼ããï¼è¤æ°ï¼è¨å®ã§ããããã«ãããã¨æãã ããããããã®æ å ±ã管çç»é¢ããè¨å®å¯è½ã«ããå¿ è¦ãããã ãããããè¨å®é¢ä¿ã¯å¤é¨ãã¡ã¤ã«ã«çºãã¦ãã¾ãã®ãå¾çã ããã ã§â¦
ããã¹ãã®æ´å½¢è¡¨ç¤ºã®å¾ã¯ãã¡ã¤ã«ãªã¹ãã®åå¾ã¨æ¸ãè¾¼ã¿ã åãæ¢ãããã£ã¬ã¯ããª/ãã¡ã¤ã«ã®ä¸è¦§è¡¨ç¤ºã¨ããã¹ãã®ç·¨éæ©è½ã¯åãããæ¸ãè¾¼ã¿å¾ã«ä¸è¦§è¡¨ç¤ºç»é¢ã«æ»ãã500ã¨ã©ã¼ãè¿ãããã¼ã ã¨ããã§ããã¡ã¤ã«æ¸ãè¾¼ã¿è¾ºãããã·ã¹ãã çã«ã¯ãªãã£â¦
PukiWiki表è¨ã®ã|åºåã/>ã§colspan/~ã§rowspanãå®è£ ã«æ©ãã colspanã¯>ã®æ°ãã«ã¦ã³ããã¦>ã§ãªãã»ã«ã«colspan=åæ°+1ãä»ãå ããã ãã ããé£ãããªãããrowspanã¯ä»¥åã®è¡ã«æ»ã£ã¦å¦çããã°ãªããªããã©ããããã®ãã æåã®æ®µéã§å¤å®ãè¡ãããâ¦
ããã¾ã§ã¯ã¦ãªè¡¨è¨ã®å®è£ ãåæã«éçºãé²ãã¦ããç°¡æCMSã§ããããWiki表è¨ã«å¯¾å¿ããã¢ãµããã®åºç¾ã§å°ã è¿·ããçãã¦ããã èªåä¸äººã§ä½¿ãåã«ã¯ã©ã¡ãã§ãåé¡ãªãã®ã ããä»äººã«ä½¿ããããã¨ãèããå ´åã«ã©ã¡ãã®æ¹ãåªãã¦ããã ãããã ãã£ã¨â¦
çµæ§æ¸ãã¦ããã®ã§æ°è¦ã«perlã«ãã´ãªè¿½å ã èªåã§ä½ã blog ãã¼ã«ã«å£ã£ã¦ç©ºè¡ã§ãããã¨æ¬æãåãåãã¦ã¿ããé åã«èªã¿è¾¼ãã ããã¹ããã¡ã¤ã«ãforeachã§1è¡ã¥ã¤å¦çãæ¹è¡æåãåé¤ããå 容ã空ã ã£ããlastã§å¦ççµäºãããã§ãªããã°$descriptiâ¦
æããããã«ã´ã¡ãªã¨ã¼ã·ã§ã³ãå¢ãããã¨ãHTMLã®ãã¶ã¤ã³ãã¿ã¼ã³ãåãæ¿ãã¦ã¿ãããã¢ãã¼ã¸ãä½æãã¦ã¿ãã CSSåãæ¿ãã®JavaScriptãåã£ã¦ãã¦å¼ã£ã¦ã¿ãããçæããã½ã¼ã¹ã表示ã§ããªãJavaScriptã¯ã©ãããããã°ãã¥ãããçµå±Perlã§æ¸ãã¦â¦