gnumeric r16835 - trunk/plugins/perl-func



Author: mortenw
Date: Sun Sep 28 21:44:56 2008
New Revision: 16835
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16835&view=rev

Log:
2008-09-26  Yukihiro Nakai <nakai gnome gr jp>

	* perl-loader.c: Enable again



Modified:
   trunk/plugins/perl-func/perl_func.pl

Modified: trunk/plugins/perl-func/perl_func.pl
==============================================================================
--- trunk/plugins/perl-func/perl_func.pl	(original)
+++ trunk/plugins/perl-func/perl_func.pl	Sun Sep 28 21:44:56 2008
@@ -17,3 +17,44 @@
 sub desc_perl_adder {
   return ("ff", "a,b,c");
 }
+
+sub func_perl_date {
+  my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
+  return sprintf("%04d%02d%02d", $year + 1900, ++$mon, $mday);
+}
+
+sub help_perl_date {
+  return<<'EOS';
+ FUNCTION=PERL_DATE
+ SYNTAX=PERL_DATE()
+ DESCRIPTION=
+Return today's date as string.
+EOS
+}
+
+sub desc_perl_date {
+  return ("", "");
+}
+
+sub func_perl_sed {
+  my $arg = shift;
+  my $match = shift;
+  my $newch = shift;
+
+  $arg =~ s/$match/$newch/g;
+
+  return $arg;
+}
+
+sub help_perl_sed {
+  return<<'EOS';
+ FUNCTION=PERL_SED
+ SYNTAX=PERL_SED(a,b,c)
+ DESCRIPTION=
+Substite string with matching pattern. Same as $a =~ s/$b/$c/g .
+EOS
+}
+
+sub desc_perl_sed {
+  return ("sss", "a,b,c");
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]