# Can I check the results of an issue generated by the JIRA :: REST Module in a Perl environment?

**URL:** <https://community.developer.atlassian.com/t/can-i-check-the-results-of-an-issue-generated-by-the-jira-rest-module-in-a-perl-environment/26993>\
**Category:** Jira Server\
**Created:** [February 14, 2019, 7:04am UTC](https://community.developer.atlassian.com/t/can-i-check-the-results-of-an-issue-generated-by-the-jira-rest-module-in-a-perl-environment/26993 "2019-02-14T07:04:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![netdynamics](https://avatars.discourse-cdn.com/v4/letter/n/ee7513/32.png) [@netdynamics](https://community.developer.atlassian.com/u/netdynamics)\
**Post date:** [February 14, 2019, 7:04am UTC](https://community.developer.atlassian.com/t/can-i-check-the-results-of-an-issue-generated-by-the-jira-rest-module-in-a-perl-environment/26993/1 "2019-02-14T07:04:04Z")

</div>

## Hi, everyone. I created an issue using the JIRA :: REST module in the perl environment as shown below.

use utf8;  
use Filehandle;  
use strict;  
use warnings;  
use Encode;  
use JIRA::REST;

my $jira = JIRA::REST → new({  
url =\> ‘[http://company.domain:8080](http://company.domain:8080)’,  
username =\> ‘xxxxx’,  
password =\> ‘xxxxxxxxxx’,  
});

# print FILE\_H “jira: “.$jira.” \n\n” ;

## my $issue = $jira → POST(‘/issue’, undef, { fields =\> { project =\> {key =\> ‘SMPKB’}, issuetype =\> {name =\> ‘Task’}, summary =\> ‘JIRA-REST, summary.’, description =\> ‘bla bla bla.’, }, });

I also checked the issue created by logging into Atlassian Jira.  
How do I check the return value of an issue generated without logging into Atlassian Jira?  
I need to be able to check in a Perl environment.

Alex

---

<div class="post-metadata">

**Author:** ![ianRagudo](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/ianragudo/32/44527_2.png) [@ianRagudo](https://community.developer.atlassian.com/u/ianRagudo)\
**Post date:** [February 15, 2019, 6:06am UTC](https://community.developer.atlassian.com/t/can-i-check-the-results-of-an-issue-generated-by-the-jira-rest-module-in-a-perl-environment/26993/2 "2019-02-15T06:06:53Z")

</div>

Hello Alex,

Since [Create issue](https://developer.atlassian.com/cloud/jira/platform/rest/v3/?utm_source=%2Fcloud%2Fjira%2Fplatform%2Frest%2F&utm_medium=302#api-api-3-issue-post) REST API returns a JSON response body, you can check it out by calling something like

```auto
print Dumper($issue);

```

or check if the `$issue->{key}` exists, which might tell you that an issue has been successfully created. Usually, the HTTP status is checked but I am not sure how it will be done with JIRA::REST module.

Cheers,  
Ian

---

<div class="post-metadata">

**Author:** ![netdynamics](https://avatars.discourse-cdn.com/v4/letter/n/ee7513/32.png) [@netdynamics](https://community.developer.atlassian.com/u/netdynamics)\
**Post date:** [February 18, 2019, 7:17am UTC](https://community.developer.atlassian.com/t/can-i-check-the-results-of-an-issue-generated-by-the-jira-rest-module-in-a-perl-environment/26993/3 "2019-02-18T07:17:30Z")

</div>

Hi, Ian  
I sincerely appreciate your help.  
I solved it because of your help.  
The source is shown below.

use utf8;  
use Filehandle;  
use strict;  
use warnings;  
use Encode;  
use JIRA::REST;  
use REST::Client;  
use JSON;  
use Data::Dumper;  
use MIME::Base64;

y $jira = JIRA::REST → new({  
url =\> ‘[http://company.domain:8080](http://company.domain:8080)’,  
username =\> ‘xxxx’,  
password =\> ‘xxxx’,  
});

my $issue = $jira → GET(“/issue/SMPKB-16?fields=summary,description”);  
my $fields = $issue-\>{fields};  
print “summary = $fields-\>{summary}\n”;  
print “description = $fields-\>{description}\n”;

The results below.  
Active code page: 65001  
F:\ideaic\perl\site\lib\>perl ideaic\_interface\_jira\_get.pl  
summary = Issues like this one that are marked as fixed in a released version do not show up in Work mode but are included in the reports  
Wide character in print at ideaic\_interface\_jira\_get.pl line 65.  
description = 한글 테스트.

F:\ideaic\perl\site\lib\>

However, a “wide character in print at” error occurs.  
I’ve added the code below, but I get an error.  
binmode OUT, ‘:encoding($fields)’;

Cheers,  
Alex

---

<div class="post-metadata">

**Author:** ![ianRagudo](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/ianragudo/32/44527_2.png) [@ianRagudo](https://community.developer.atlassian.com/u/ianRagudo)\
**Post date:** [February 18, 2019, 8:39am UTC](https://community.developer.atlassian.com/t/can-i-check-the-results-of-an-issue-generated-by-the-jira-rest-module-in-a-perl-environment/26993/4 "2019-02-18T08:39:20Z")

</div>

Hello @netdynamics, for “wide character in print at” warning, one of the solutions is to use the `-CS` parameter mentioned in [this post](https://stackoverflow.com/questions/15210532/use-of-use-utf8-gives-me-wide-character-in-print); I tried it out and it works. There are also perl unicode related documentation in [here](http://perldoc.perl.org/perlunitut.html).

I see that you were able to incorporate the answer in [I want to print only specific field values of a specific issue - #3 by netdynamics](https://community.developer.atlassian.com/t/i-want-to-print-only-specific-field-values-of-a-specific-issue/26992/3). If that works for you kindly mark the solution to that question so that others who are facing the same issue can find the solution.

Hope this helps.  
Ian
