Search notes:

Perl module Carp

#!/usr/bin/perl
use warnings;
use strict;

use SomePackage;

SomePackage::FuncOne();
Github repository PerlModules, path: /Carp/script.pl
package SomePackage;

use warnings;
use strict;

use Carp; # Needed for croak()

sub FuncOne() {

  warn  "Warning in FuncOne"; # Warning in FuncOne at SomePackage.pm line 10.
  carp  "carp in FuncOne" ;   # carp in FuncOne at ./script.pl line 7.
  croak "croak in FuncOne";   # croak in FuncOne at ./script.pl line 7.

  print "Not reached!\n";

}


1;
Github repository PerlModules, path: /Carp/SomePackage.pm

croak

Within perl modules, croak is a better die.

See also

Perl modules.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759391596, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/modules/Carp/index(72): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78