Device::MiniLED. Device::MiniLED - send text and graphics to small LED badges and signs Version 1.00 use Device::MiniLED; my $sign=Device::MiniLED->new(devicetype => "sign"); $sign->addMsg( data => "Just a normal test message", effect => "scroll", speed => 4 ); my $pic=$sign->addPix(clipart => "zen16"); my $icon=$sign->addIcon(clipart => "heart16"); $sign->addMsg( data => "Message 2 with a picture: $pic and an icon: $icon", effect => "scroll", speed => 3 ); $sign->send(device => "COM3"); Device::MiniLED is used to send text and graphics via RS232 to our smaller set of LED Signs and badges. new my $sign=Device::MiniLED->new( devicetype => $devicetype ); $sign->addMsg This family of devices support a maximum of 8 messages that can be sent to the sign.
The $sign->addMsg method has three required arguments...data, effect, and speed: data: The data to be sent to the sign. Effect: One of "hold", "scroll", "snow", "flash" or "hold+flash" speed: An integer from 1 to 5, where 1 is the slowest and 5 is the fastest. Home | Perlgeek.de - Perl Programming and more. Attest, by Test Noir. Attest is a command-line Perl test runner similar to prove but also quite dissimilar. Apart from always running online (there is no offline mode; test results must be sent to Test Noir), the most striking feature of attest is the simplicity of its use: $ cd My-Project $ attest foo.t: pass bar.t: 3 fail widgets.t: 2 fail 5 tests failed.
The example above illustrates two things. First, from the root directory of a stanard Perl project, simply running attest runs every .t file in t/ recursively. Second, the output of attest is terse by default because the test results are not meant to be viewed online. Attest is built on and guided by two principles: Only failures are important. Test results should be archived. A project can have thousands—even tens of thousands—of tests. Testing is very important, so why throw away the results? Checkout attest on GitHub. GitHub-friendly README files with ExtUtils::MakeMaker and Module::Build | Michał Wojciechowski. GitHub is a great place to host open-source projects and expose them to a wide community of developers, so it's not surprising that more and more Perl modules are making it their home. One of the features of GitHub is that it checks if a repository has a README file in its root directory, and displays it on the home page of the repository.
This makes the README file a good place to introduce your project to the public. GitHub also understands a number of markup languages, such as Markdown and Textile, and if the README file is in one of these formats, it will be transformed into nicely formatted HTML. One of the supported formats is POD, which means that the standard documentation of a Perl module can be used as its README file and serve as the repository's home page (much like on CPAN). This article wouldn't be particularly interesting if I told you to now go and make the README file yourself, would it? ExtUtils::MakeMaker Module::Build You can now run perl Build.PL, and then . The Effective Perler. Moose - A postmodern object system for Perl.
Moose is an extension of the Perl 5 object system. The main goal of Moose is to make Perl 5 Object Oriented programming easier, more consistent and less tedious. With Moose you can think more about what you want to do and less about the mechanics of OOP. Moose code sample package Point;use Moose; # automatically turns on strict and warnings has 'x' => (is => 'rw', isa => 'Int');has 'y' => (is => 'rw', isa => 'Int'); sub clear { my $self = shift; $self->x(0); $self->y(0);} package Point3D;use Moose; extends 'Point'; has 'z' => (is => 'rw', isa => 'Int'); after 'clear' => sub { my $self = shift; $self->z(0);}; New to Moose? If you're new to Moose, the best place to start is the Moose::Manual docs, followed by the Moose::Cookbook. The cookbook recipes on Moose basics will get you up to speed with many of Moose's features quickly.
Moose is also featured prominently in a couple of books: Organizations that use Moose. Moose - A postmodern object system for Perl. Perl Moderne. Moose or No Moose – Perl Hacks. I’ve known about Moose for some time.The first time I talked about it in a training course was at the Teach-In back in the summer of 2007. It’s been part of my training courses ever since. But even though I was telling people about Moose in my training courses, I wasn’t really making use of it in my own code. Obviously as a freelancer, in my day-job I’m constrained to using whatever technologies my clients are using and I have yet to be paid to work on a project that is already using Moose (although I’ve suggested that a few clients switch to it). That leaves my own code. Which is largely my CPAN modules. Until recently I hadn’t used Moose for any of them.
Having gone to YAPC::Europe this year, I was subjected to another week of people telling me face to face just how cool Moose was. The next module I tried was Parse::RPM::Spec. Impressed by how easily that conversion was I moved on to Array::Compare. Yesterday I got an RT ticket asking me to stop using Moose. Let me know what you think. The Perl Review. Modern Catalyst. La Programmation Orientée Objet en Perl. La POO est une méthode de programmation née de réflexions sur la qualité et le coût de la création et de l'entretien d'un programme.
En effet, il a été constaté que de 70 à 80% du coût d'un programme provient de la phase de maintenance et non de celle de création pure. Le but de la POO est de réduire ce coût. Pour cela, on a fixé des critères de qualité d'un programme OO. Ils sont au nombre de quatre : la Validité : respect du cahier des charges ; l'Extensibilité : permettre l'ajout de fonctionnalités ; la Réutilisabilité : permettre l'utilisation d'un même composant pour différentes applications ; la Robustesse : consiste en un traitement des exceptions. À la vue de ceci, vous vous demandez pourquoi apprendre la POO : il y a de fortes chances que vous n'ayez pas à programmer un jour une application d'un coût élevé, donc pourquoi l'utiliser ? Sans trop détailler, je vais essayer d'établir la philosophie de base de la POO. Maintenant, prenons deux personnes différentes. 2-A. 2-B. 2-C. What CPAN Doesn't Do - Modern Perl Books, a Modern Perl Blog.
Configuration-Free CPAN Installations and What's Wrong with Module::Install both hinted at a fundamental difficulty in managing software from the CPAN. Enough teasing. The fundamental assumption of the CPAN that makes managing software through CPAN clients difficult is that newer software can always replace older software. That's not the CPAN's problem, not really. Perl 5 has this version number problem too, and it's the source of much of the backwards compatibility troubles in the Perl 5 world. On the CPAN, no one agrees on what version numbers mean. No one agrees on backwards compatibility concerns. I'm not sure it's the job of CPAN or the CPAN maintainers to try to solve this problem. Even still, fighting over whether Module::Build is of the devil because (insert silly reason here) or complaining that Module::Install is a stupid patch over a pile of nasty, almost unsupported hacks misses the real point.
Perl Console - Perl code interactive evaluator with completion. The easiest way to write web applications with Perl.