top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Looking for introductory to advanced examples of RESTful programming in Perl

+1 vote
32 views

I'm looking for introductory to advanced examples of RESTful programming in Perl preferably with some good explanations and best practices.

posted Aug 12, 2015 by Vijay Shukla

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

2 Answers

0 votes

You can try any of the web framework for creating RESTful API

You can try Mojolicious http://mojolicio.us/perldoc or
you can try dancer https://metacpan.org/pod/Dancer2::Cookbook#Writing-a-REST-application
https://metacpan.org/pod/Dancer2::Tutorial

answer Aug 12, 2015 by Deepti Singh
0 votes

take a look at http://www.todobackend.com/

you can port the mojolicious one to Dancer as a learning experience.

answer Aug 12, 2015 by Amit Mishra
Similar Questions
+1 vote

I need to access ClearQuest programatically using Perl. I just found ClearQuest OSLC REST API. Client is planning to use ClearQuest web 7.1.1. I read that it comes with OSLC REST API out the box.
Can someone please provide me some examples on how I can access the CQ through Perl using this API.

+1 vote

I've a program that needs to print some fields formatted in different ways according to some conditions. The solution I come up is working, but I'm looking for a suggestion for something more elegant.

What I do is something like the following:

print sprintf $formats[ $condition ], @fields;

where $condition is the condition used to select a sprintf format string out of an array (@formats) that contains something like:

my @formats = (
 qw( %09d %-1s %03d ... )
, qw(%-4s %1s %09d %1s %-150s %-4s %011d)
, ...
);

Now, while this approach is working really fine, it is a little hard to decode, especially considering that I've got some formats with 50+ fields. I don't believe that using Perl formats is a solution, it will provide a quite longer configuration (consider I've got even fields specified as "-100%s"!).

Any suggestion to get a more readable code?

+2 votes

I have this series of numbers:

349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,
373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,
425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,
449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,
473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496

there are two ranges in there: 349-396, 425-496. Any hints as to how to write a perl code to represent the series of numbers as a range?

+2 votes

I have this simple script to automatically print HTML selection option.

#!/usr/bin/env perl
use strict;
for (reverse(1943 .. 1991)){
  print "$_n";}

I need to print all the years between 18 and 73 without hard coding the range in the for loop as in the above. I am considering the use of localtime to compute the current year as below $yr=(localtime), but I cant think of an easy way to achieved what I want to do.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...