summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MDK/Common/String.pm3
-rw-r--r--perl-MDK-Common.spec5
2 files changed, 6 insertions, 2 deletions
diff --git a/MDK/Common/String.pm b/MDK/Common/String.pm
index 6a4b451..2894c2b 100644
--- a/MDK/Common/String.pm
+++ b/MDK/Common/String.pm
@@ -43,6 +43,7 @@ an empty line
=item warp_text(STRING, INT)
return a list of lines which do not exceed INT characters
+(or a string in scalar context)
=item warp_text(STRING)
@@ -147,7 +148,7 @@ sub warp_text {
}
push @l, "$beg$t";
}
- @l;
+ wantarray ? @l : join("\n", @l);
}
1;
diff --git a/perl-MDK-Common.spec b/perl-MDK-Common.spec
index 511c933..9c95da5 100644
--- a/perl-MDK-Common.spec
+++ b/perl-MDK-Common.spec
@@ -2,7 +2,7 @@
# do not change the version here, change in MDK/Common.pm.pl
%define version THEVERSION
-%define release 9mdk
+%define release 10mdk
%define perl_sitelib %(eval "`perl -V:installsitelib`"; echo $installsitelib)
Summary: Various simple functions
@@ -50,6 +50,9 @@ rm -rf $RPM_BUILD_ROOT
# MODIFY IN THE CVS: cvs.mandrakesoft.com:/cooker soft/perl-MDK-Common
%changelog
+* Thu Feb 14 2002 Pixel <pixel@mandrakesoft.com> 1.0.2-10mdk
+- warp_text returns a join'ed string in scalar context
+
* Sun Jan 27 2002 Pixel <pixel@mandrakesoft.com> 1.0.2-9mdk
- add MDK::Common::DataStructure::group_by2