[perldoc-kr] r693 committed - Use 5.010 features and common::sense

1 view
Skip to first unread message

codesite...@google.com

unread,
Apr 24, 2010, 7:35:51 PM4/24/10
to perldoc...@googlegroups.com
Revision: 693
Author: keedi.k
Date: Sat Apr 24 16:35:12 2010
Log: Use 5.010 features and common::sense

http://code.google.com/p/perldoc-kr/source/detail?r=693

Modified:
/trunk/slide/mkslide/bin/mkslide.pl

=======================================
--- /trunk/slide/mkslide/bin/mkslide.pl Wed Aug 27 20:16:56 2008
+++ /trunk/slide/mkslide/bin/mkslide.pl Sat Apr 24 16:35:12 2010
@@ -21,9 +21,8 @@
# REVISION: ---

#===============================================================================

-use strict;
-use warnings;
-
+use 5.010;
+use common::sense;
use YAML;
use Readonly;
use Switch::Perlish;
@@ -63,8 +62,8 @@
chomp $line;
next unless $line;

- switch $line, sub {
- case qr/$TAG{code}/, sub {
+ given ( $line ) {
+ when ( /$TAG{code}/ ) {
# 코드 태그 처리
my @sub_lines;
my $opt_str = (split / /, $line, 2)[1];
@@ -75,12 +74,12 @@
or do {
push @sub_lines, "Cannot open file [$opt{src}]:\n
$!";
print "\n", code_markup(\%opt, @sub_lines);
- stop;
+ break;
};
@sub_lines = <$fh>;
close $fh;
print "\n", code_markup(\%opt, @sub_lines);
- stop;
+ break;
}

LOOP_CODE_LINES:
@@ -90,7 +89,7 @@
}
print "\n", code_markup(\%opt, @sub_lines);
};
- case qr/$TAG{text}/, sub {
+ when ( /$TAG{text}/ ) {
# 텍스트 태그 처리
my @sub_lines;

@@ -102,7 +101,7 @@
}
print "\n", text_markup(@sub_lines);
};
- case qr/($TAG{ul})|($TAG{ul_item})/, sub {
+ when ( /($TAG{ul})|($TAG{ul_item})/ ) {
# 순서 없는 리스트 태그 처리
my @sub_lines;
my %opt;
@@ -125,12 +124,12 @@
}
print "\n", ul_markup(\%opt, @sub_lines);
};
- case qr/$TAG{img}/, sub {
+ when ( /$TAG{img}/ ) {
# 이미지 태그 처리
print "\n", img_markup($line);
};
- default sub {
- # 일반 적인 경우
+ default {
+ # 기본
print "\n", normal_markup($line);
};
};

--
You received this message because you are subscribed to the Google Groups "perldoc-kr-dev" group.
To post to this group, send email to perldoc...@googlegroups.com.
To unsubscribe from this group, send email to perldoc-kr-de...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/perldoc-kr-dev?hl=en.

Reply all
Reply to author
Forward
0 new messages