A couple of days ago, I updated to my laptop to Fedora 21. One of the new features was an application called DevAssistant which claimed that:
It does not matter if you only recently discovered the world of software development, or if you have been coding for two decades, there’s always something DevAssistant can do to make your life easier.
I thought it was worth investigating – particularly when I saw that it had support for Perl.
Starting the GUI and pressing the Perl button gives me two options: “Basic Class” and “Dancer”. I chose the “Basic Class” option. That gave me an dialogue box where I could give my new project a name. I chose “MyClass” (it’s only an example!) This created a directory called MyClass in my home directory and put two files in that directory. Here are the contents of those two files.
main.pl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#!/usr/bin/perl #use strict; use warnings; use POSIX qw(strftime); use myClass; my $myClass = new myClass( "Holiday", "Baker Street", "Sherlock Holmes"); my $tm = strftime "%m/%d/%Y", localtime; $myClass->enterBookedDate($tm); print ("The hotel name is ". $myClass->getHotelName() . "\n"); print ("The hotel street is ". $myClass->getStreet() . "\n"); print ("The hotel is booked on the name ". $myClass->getGuestName() . "\n"); print ("Accomodation starts at " . $myClass->getBookedDate() . "\n"); |
myClass.pm
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
package myClass; use strict; use warnings; sub new { my $class = shift; my $self = { _hotelName => shift, _street => shift, _name => shift, _date => undef }; bless $self, $class; return $self; } sub enterBookedDate { my ($self) = shift; my $date = shift; $self->{_date} = $date; } sub getHotelName { my $self = shift; return $self->{_hotelName}; } sub getStreet { my $self = shift; return $self->{_street}; } sub getGuestName { my $self = shift; return $self->{_name}; } sub getBookedDate { my $self = shift; return $self->{_date}; } 1; |
It’s great, of course, that the project wants to support Perl. I think that we should do everything we can to help them. But it’s clear to me that they don’t have anyone on the team who knows anything about modern Perl practices.
So who wants to volunteer to help them?
Update: So it turns out that the dev team are really responsive to pull requests π
Hi, guys.
I am a DevAssistant upstream developer, and I’d love to get better Perl support in DA. We indeed don’t have anyone dedicated to Perl, and would like to talk to you in order to get something up to date. Please, get in touch with us on mailing lists (devassistant@lists.fedoraproject.org), IRC (#devassistant at freenode), or GitHub (https://github.com/devassistant).
Tomas
P. S. On a related note, I would like to bring your attention to the new version of DevAssistant, which is currently available for Fedora in COPR: https://copr.fedoraproject.org/coprs/tradej/DevAssistant/. The Perl Assistant’s source used therein is available at https://github.com/devassistant/dap-perl .