diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-02-14 19:48:18 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-02-14 19:48:18 +0000 |
commit | d9539a662a70ffa83fbf5decb15fd1cc628d9a0f (patch) | |
tree | 3459a377337c55b068f2904440b454ca08344b0e | |
parent | cec3bf7ceade91064ce3d87122c5aa0967e23a55 (diff) | |
download | perl-MDK-Common-d9539a662a70ffa83fbf5decb15fd1cc628d9a0f.tar perl-MDK-Common-d9539a662a70ffa83fbf5decb15fd1cc628d9a0f.tar.gz perl-MDK-Common-d9539a662a70ffa83fbf5decb15fd1cc628d9a0f.tar.bz2 perl-MDK-Common-d9539a662a70ffa83fbf5decb15fd1cc628d9a0f.tar.xz perl-MDK-Common-d9539a662a70ffa83fbf5decb15fd1cc628d9a0f.zip |
warp_text returns a join'ed string in scalar context
-rw-r--r-- | MDK/Common/String.pm | 3 | ||||
-rw-r--r-- | perl-MDK-Common.spec | 5 |
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 |