⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.67
Server IP:
50.6.168.112
Server:
Linux server-617809.webnetzimbabwe.com 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.4.10
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
.cpan
/
build
/
Test-Warnings-0.033-0
/
examples
/
View File Name :
warning_like.t
use strict; use warnings; # this test demonstrates the issue described in the main documentation, where # a test of the contents of a captured warning can inadvertently match another # part of the stack trace (the pattern argument to the test sub, itself!) use Test::More; use Test::Warnings ':all'; use Carp 'cluck'; sub warning_like(&$;$) { my ($code, $pattern, $name) = @_; like( &warning($code), $pattern, $name ); } warning_like(sub { cluck 'blah blah' }, qr/foo/, 'foo seems to appear in the warning'); # the test only passes when we invert it unlike( ( warning { cluck 'blah blah' } || '' ), qr/foo/, 'foo does NOT ACTUALLY appear in the warning', ); done_testing;