µ¥ÀÌÅÍ :: Çü½Ä :: ¿¹»Û :: ÄܼÖ

ÄÜ¼Ö Ãâ·ÂÀ»À§ÇÑ ¿¹»Û Àμ⠵¥ÀÌÅÍ ±¸Á¶
Áö±Ý ´Ù¿î·Îµå

µ¥ÀÌÅÍ :: Çü½Ä :: ¿¹»Û :: ÄÜ¼Ö ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • Perl Artistic License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Steven Haryanto
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://search.cpan.org/~sharyanto/

µ¥ÀÌÅÍ :: Çü½Ä :: ¿¹»Û :: ÄÜ¼Ö Å±×


µ¥ÀÌÅÍ :: Çü½Ä :: ¿¹»Û :: ÄÜ¼Ö ¼³¸í

data :: format :: pretty :: ÄܼÖÀº ÄÜ¼Ö ÇÁ·Î±×·¥¿¡ ÀûÇÕÇÑ "¿¹»Û"¶Ç´Â "¸ÚÁø"Çü½ÄÀ¸·Î µ¥ÀÌÅÍ ±¸Á¶¸¦ Ãâ·ÂÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù. ÀÌ ¸ðµâÀÇ ¾ÆÀ̵ð¾î´Â Äֿܼ¡ µ¥ÀÌÅÍ ±¸Á¶¸¦ ¼öÆò ´ýÇÁ ÇϸçÀÌ ¸ðµâÀº ÃÖÁ¾ »ç¿ëÀÚ¿¡°Ô µ¥ÀÌÅ͸¦ °¡Àå Àß Ç¥½ÃÇÏ´Â ¹æ¹ýÀ» ¾Ë¾Æ³»´Â °ÍÀÔ´Ï´Ù.ÀÌ ¸ðµâÀº ´ëºÎºÐ ¸ÚÁø ASCII·Î µ¥ÀÌÅ͸¦ Ç¥½ÃÇÏ·Á°íÇÕ´Ï´Ù. Å×À̺í (¶Ç´Â ÀÏ·ÃÀÇ ASCII Å×À̺í)À» »ç¿ëÇÏ¿© yaml·Î Ç¥½ÃÇÕ´Ï´Ù.ÀÌ ¸ðµâÀº ¹è°üÀ» °í·ÁÇÏ¿© »ç¿ëÀÚ°¡ ÇÁ·Î±×·¥ÀÇ Ãâ·ÂÀ» ´Ù¸¥ ÇÁ·Î±×·¥À¸·Î ÆÄÀÌÇÁ ÇÒ ¶§ ´õ °£´ÜÇÏ°í ÀûÇÕÇÑ Çü½ÄÀ» Ãâ·ÂÇÕ´Ï´Ù. ½Ã°£Àº ¾Æ¹« °Íµµ ±¸¼º ÇÒ ÇÊ¿ä°¡ ¾øÁö¸¸ ÀϺΠ¿É¼ÇÀº Ãâ·ÂÀ» Á¶Á¤ÇÒ ¼ö ÀÖµµ·Ï Á¦°øµË´Ï´Ù.ÀÌ ¸ðµâÀº log :: logging.synopsisin¿¡ ´ëÇÑ log :: for data :: format :: pretty :: console qw (format_pretty)¸¦ »ç¿ëÇÕ´Ï´Ù. ...¿¡ ... Àμâ format_pretty ($ °á°ú); ÀϺΠ¿¹Á¦ Ãâ·Â : scalar, format_pretty ( "foo") : foolist, format_pretty () : + ------ + | foo | | ¹Ù | | Baz | | qux | '------'ÇÁ·Î±×·¥ Ãâ·ÂÀÌ ÆÄÀÌÇÁµÇ°íÀÖ´Â °æ¿ì (Áï, -t stdout)°¡ °ÅÁþ ÀÎ °æ¿ì) : foo bar baz quxhash, format_pretty ({foo => data ", bar =>" Çü½Ä ", baz =>"pretty ", qux =>"console "}) : + ----- + --------- + | ¹Ù | Çü½Ä | | Baz | ²Ï | | foo | µ¥ÀÌÅÍ | | qux | ÄÜ¼Ö | '----- + --------'2 Â÷¿ø ¹è¿­, format_pretty (, , undef]]) : + --------- + --------- + --------- + | 1 | 2 | | | 28 | ¹Ù | 3 | | foo | 3 | | '--------- + --------- + ---------'dbiÀÇ fetchrow_hashref () ¹× Ä£±¸¸¦ »ç¿ëÇÏ´Â °æ¿ì ÀϹÝÀûÀ¸·Î ¹ß°ßµÇ´Â Çؽà refsÀÇ ¹è¿­, format_pretty () : .------------. | | B | C | + --- + --- +-- + | 1 | 2 | | | | 2 | 3 | | | | 4 | '--- + --- + ---'ÀϺΠº¹ÀâÇÑ µ¥ÀÌÅÍ, format_pretty ({summary => "blah ...", user => , È®ÀÎ => 0 } : ¿ä¾à : Blah ... »ç¿ëÀÚ : .------------------------------------ | µµ¸ÞÀÎ | À̸§ | ÄõÅÍ | + ------------------- + ------ + ------- + | Foo.com, Bar.com | ¹öµð | 1000 | | Baz.com | arif | 2000 | '------------------ + ------ + -------'È®ÀÎ : 0À» ó¸® ÇÒ ¼ö¾ø´Â ±¸Á¶È­´Â ´Ü¼øÈ÷ Ãâ·Â µÉ °ÍÀÔ´Ï´Ù. yaml, format_pretty ({a {b => 1}}) : --- A : B : 1 Á¦Ç° ȨÆäÀÌÁö


µ¥ÀÌÅÍ :: Çü½Ä :: ¿¹»Û :: ÄÜ¼Ö °ü·Ã ¼ÒÇÁÆ®¿þ¾î