File: autodie_test_module.pm

package info (click to toggle)
libautodie-perl 2.10-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 528 kB
  • ctags: 305
  • sloc: perl: 4,012; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 301 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package main;
use strict;
use warnings;

# Calls open, while still in the main package.  This shouldn't
# be autodying.
sub leak_test {
    return open(my $fh, '<', $_[0]);
}

package autodie_test_module;

# This should be calling CORE::open
sub your_open {
    return open(my $fh, '<', $_[0]);
}

1;