File: eval2

package info (click to toggle)
libdevel-cover-perl 1.52-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,096 kB
  • sloc: perl: 11,568; sh: 1,030; makefile: 7
file content (19 lines) | stat: -rw-r--r-- 438 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl

# Copyright 2004-2026, Paul Johnson (paul@pjcj.net)

# This software is free.  It is licensed under the same terms as Perl itself.

# The latest version of this software should be available from my homepage:
# https://pjcj.net

use lib "tests";

$x = shift || 0;
print "1 - $x\n";
if ($x) { eval 'use E2' }
print "3 - $x\n";
if ($x < 4) { eval 'use E3' }
print "4 - $x\n";
if ($x < 6) { eval 'use E4' }
print "5 - $x\n";