Detect perl error

Santiago DIEZ <[email protected]>
Newsgroups gmane.comp.otrs.user
Message-ID <CAJh8RqVQef2cwz7zam=ahiYO6fGpWOsVjG=BaYbQA+ufT1aTCA@mail.gmail.com>
Hi,

I'm new to OTRS as well as to Perl.

I'm wondering how I can detect the failure in the function TicketMerge.

Here is my script:

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

use Kernel::System::ObjectManager;
local $Kernel::OM = Kernel::System::ObjectManager->new();
my $TicketObject = $Kernel::OM->Get('Kernel::System::Ticket');


my $Success = $TicketObject->TicketMerge(
        MainTicketID  => 1673,
        MergeTicketID => 1689123,
        UserID        => 1,
) || die();

**************************************

Is this scenario, ticket id 1689123 does NOT exist and command
TicketMerge fails but the script exits with success.

How can I know when it fails?

Regards
-------------------------
Santiago DIEZ
Quark Systems & CAOBA
23 rue du Buisson Saint-Louis, 75010 Paris
-------------------------
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/mailman/listinfo/otrs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.