File: 90other.t

package info (click to toggle)
libsub-recursive-perl 0.05-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 120 kB
  • sloc: perl: 60; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 399 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use Test::More tests => 1 + 2;
BEGIN { require_ok('Sub::Recursive') };

#########################

use strict;

BEGIN { use_ok('Sub::Recursive', qw/ :ALL /) }

sub foo { recursive { 1 } }

($a, $b) = (foo(), foo());

isnt($a, $b);

# This test it to make sure that the same subroutine isn't returned.
# If "recursive" was changed to "sub" in foo, the test would fail for
# at least 5.6.1 and 5.8.0.