You can create a signal handler for die and handle the exception in there. Refer https://users.cs.cf.ac.uk/Dave.Marshall/PERL/node116.html
On Thu, 8 Aug, 2019, 8:15 AM Eliza, <[email protected]> wrote: > Hello, > > I use such a module from other people. > In this module there is the "die" statement, for example, > > connect(...) or die $!; > > Then my main program will die follow up this "die". > But I don't want the caller to die even if "die" was happened in the > module. > How to handle with it? > > Thank you. > Eliza > > -- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > http://learn.perl.org/ > > >
