summaryrefslogtreecommitdiff
path: root/lib/VNDB/Func.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2008-12-09 13:08:08 +0100
committerYorhel <git@yorhel.nl>2008-12-09 13:08:08 +0100
commit66bc1533761ae28c0c8cbcea91b80c0319d86b39 (patch)
tree9b321ebbdc34c5b57501dfd0278b9b0fcadc8efd /lib/VNDB/Func.pm
parent62ab2e931cf21236e83d4483d8cb4eb773f26a89 (diff)
Code cleanup: removed leading spaces and combined DB/{Votes,VNList,WishList}.pm into ULists.pm
Diffstat (limited to 'lib/VNDB/Func.pm')
-rw-r--r--lib/VNDB/Func.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/VNDB/Func.pm b/lib/VNDB/Func.pm
index 8971c6a8..bf0a871f 100644
--- a/lib/VNDB/Func.pm
+++ b/lib/VNDB/Func.pm
@@ -31,7 +31,7 @@ sub date {
# m = 99 -> month+day unkown
# d = 99 -> day unknown
# return value: (unknown|TBA|yyyy|yyyy-mm|yyyy-mm-dd)
-# if date > now: <b class="future">str</b>
+# if date > now: <b class="future">str</b>
sub datestr {
my $date = sprintf '%08d', shift||0;
my $future = $date > strftime '%Y%m%d', gmtime;
@@ -72,7 +72,7 @@ sub userstr {
# [spoiler] .. [/spoiler]
# v+, v+.+
# http://../
-sub bb2html {
+sub bb2html {
my $raw = shift;
my $maxlength = shift;
$raw =~ s/\r//g;
@@ -127,15 +127,15 @@ sub bb2html {
} elsif($_ eq '[/raw]') {
pop @open if $open[$#open] eq 'raw';
next;
- }
-
+ }
+
# normal text processing
$length += length $_;
last if $maxlength && $length > $maxlength;
$result .= $e->($_);
}
- $result .= '</a>'
+ $result .= '</a>'
while((local $_ = pop @open) ne 'first');
$result .= '...' if $maxlength && $length > $maxlength;
@@ -146,7 +146,7 @@ sub bb2html {
# GTIN code as argument,
# Returns 'JAN', 'EAN', 'UPC' or undef,
# Also 'normalizes' the first argument in place
-sub gtintype {
+sub gtintype {
$_[0] =~ s/[^\d]+//g;
$_[0] =~ s/^0+//;
my $c = shift;