From: Vincent Pit Date: Tue, 5 Aug 2008 09:54:22 +0000 (+0200) Subject: Add support for gmtime X-Git-Tag: v0.02~9 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=ffe40b718c29e7f7a3ced4c719302736c573d710;p=perl%2Fmodules%2FSub-Nary.git Add support for gmtime --- diff --git a/lib/Sub/Nary.pm b/lib/Sub/Nary.pm index d1c1dda..c7792d5 100644 --- a/lib/Sub/Nary.pm +++ b/lib/Sub/Nary.pm @@ -207,6 +207,7 @@ $ops{$_} = 'list' for qw/padany flip match entereval readline/; $ops{stat} = 13; $ops{caller} = sub { my @a = caller 0; scalar @a }->(); $ops{localtime} = do { my @a = localtime; scalar @a }; +$ops{gmtime} = do { my @a = gmtime; scalar @a }; sub enter { my ($self, $cv) = @_; diff --git a/t/20-return.t b/t/20-return.t index 0f9cff6..c4194a6 100644 --- a/t/20-return.t +++ b/t/20-return.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 53; +use Test::More tests => 54; use Sub::Nary; @@ -78,6 +78,7 @@ my @tests = ( [ sub { return stat $0 }, 13 ], [ sub { return caller 0 }, sub { my @a = caller 0; scalar @a }->() ], [ sub { return localtime }, do { my @a = localtime; scalar @a } ], + [ sub { return gmtime }, do { my @a = gmtime; scalar @a } ], ); my $i = 1; diff --git a/t/21-list.t b/t/21-list.t index af3af50..80eb5ab 100644 --- a/t/21-list.t +++ b/t/21-list.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 39; +use Test::More tests => 40; use Sub::Nary; @@ -66,6 +66,7 @@ my @tests = ( [ sub { stat $0 }, 13 ], [ sub { caller 0 }, sub { my @a = caller 0; scalar @a }->() ], [ sub { localtime }, do { my @a = localtime; scalar @a } ], + [ sub { gmtime }, do { my @a = gmtime; scalar @a } ], ); my $i = 1;