summaryrefslogtreecommitdiff
path: root/regress/usr.sbin/pkg_add/inject-temp4
blob: 73b37bd854aec88d5095e11c359c8cda307420e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /usr/bin/perl

# $OpenBSD: inject-temp4,v 1.1 2019/07/10 11:55:40 espie Exp $
use strict;
use warnings;
use OpenBSD::Temp;

package OpenBSD::Temp;
use Wrapper;
wrap('permanent_file',
    sub {
    	my $original = shift;
	if (!defined $_[0]) {
		shift;
		unshift @_, '/nonexistent';
	}
	goto &$original;
    });
1;