~ubuntu-branches/ubuntu/edgy/libapache2-mod-perl2/edgy

« back to all changes in this revision

Viewing changes to Apache-Test/t/bad_coding.t

  • Committer: Bazaar Package Importer
  • Author(s): Andres Salomon
  • Date: 2005-08-12 01:40:38 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050812014038-gjigefs55pqx4qc8
Tags: 2.0.1-3
Grr.  Really include perl.conf file; it got lost due to diff not
wanting to add an empty file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
use strict;
 
2
use warnings FATAL => 'all';
 
3
 
 
4
use Apache::Test;
 
5
use Apache::TestRequest;
 
6
 
 
7
# This test tests how good Apache-Test deals with bad coding practices
 
8
# of its users
 
9
 
 
10
plan tests => 1;
 
11
 
 
12
{
 
13
    # passing $_ to a non-core function inside a foreach loop or
 
14
    # similar, may affect $_ on return -- badly breaking things and
 
15
    # making it hard to figure out where the problem is coming from.
 
16
    #
 
17
    # have_* macros localize $_ for these bad programming cases
 
18
    # let's test that:
 
19
    my @list = ('mod_dir');
 
20
    my %modules = map { $_, have_module($_) } @list;
 
21
    ok 1;
 
22
}