Loading ...
Sorry, an error occurred while loading the content.

46939Re: [mh] Question on xPL-perl

Expand Messages
  • Lieven Hollevoet
    Mar 5, 2014
      Hey George,

      you need to perform a ‘make install’ so that the library is updated on you system with the new file you added and so that Client.pm can find the updated code.
      You will beed to update the MANIFEST file too.

      The support for developing new code in xpl-perl is not very developer friendly right now. I plan to migrate to Dist::Zille one day, but that will not be for the next weeks/months I’m afraid.

      Hope this helps you further.

      Kind regards,
      Lieven.

      Op 4-mrt.-2014, om 23:32 heeft George Clark <gac@...> het volgende geschreven:

      > Hi Lieven,
      >
      > I'm trying to create a xpl-perl plugin / dock for managing my arduino,
      > and as you suggested earlier, I'm trying to start with your jeenodes code.
      >
      > I must be missing something really fundamental, but I cannot figure out
      > the steps to create a new plugin. It's making me feel like an idiot at
      > this point. This should be so simple, and I'm stumped.
      >
      > Copy bin/xpl-jeenodes.pl to bin/xpl-jeenodes2.pl
      > :%s/eenodes/eenodes2/g
      >
      > Copy lib/xPL/Dock/Jeenodes.pm to lib/xPL/Dock/Jeenodes2.pm
      > :%s/eenodes/eenodes2/g
      >
      > No other changes, just a basic renaming for now, and some edits to keep
      > the internal module/package names consistent. I lose access to the
      > options strings. No usage help or anything. The fail happens down
      > in ./lib/xPL/Client.pm, subroutine new().
      >
      > It's almost as though I'm missing some sort of registration. I can
      > get the same failure just by renaming bin/xpl-jeenodes to
      > bin/xpl-jeenodes2, without any other edits. The getopts seem to be
      > ignored.
      >
      > I know I'm going to feel like an idiot eventually ... but can you
      > suggest where I'm going wrong?
      >
      > Thanks,
      > George
      >
      > gac@cardinal: ~/automation/xpl-perl (mh-arduino)$ perl bin/xpl-jeenodes2
      > --device /dev/ttyACM0
      > xPL::Dock->new: device_id invalid
      > at bin/xpl-jeenodes2 line 34.
      >
      > These are the diff's from your jeenodes code.
      >
      > diff -Naur bin/xpl-jeenodes bin/xpl-jeenodes2
      > --- bin/xpl-jeenodes 2014-03-04 15:55:05.410781892 -0500
      > +++ bin/xpl-jeenodes2 2014-03-04 16:40:50.437285421 -0500
      > @@ -2,7 +2,7 @@
      >
      > =head1 NAME
      >
      > -xpl-jeenodes - Perl script for an xPL Jeenodes interface
      > +xpl-jeenodes2 - Perl script for an xPL Jeenodes2 interface
      >
      > =head1 SYNOPSIS
      >
      > @@ -29,7 +29,7 @@
      >
      > use strict;
      > use warnings;
      > -use xPL::Dock qw/Jeenodes/;
      > +use xPL::Dock qw/Jeenodes2/;
      > $|=1; # autoflush helps debugging
      > my $xpl = xPL::Dock->new;
      > $xpl->main_loop;
      >
      >
      > --- lib/xPL/Dock/Jeenodes.pm 2014-02-17 10:51:34.314101463 -0500
      > +++ lib/xPL/Dock/Jeenodes2.pm 2014-03-04 16:41:17.026989935 -0500
      > @@ -1,18 +1,18 @@
      > -package xPL::Dock::Jeenodes;
      > +package xPL::Dock::Jeenodes2;
      >
      > =head1 NAME
      >
      > -xPL::Dock::Jeenodes - xPL::Dock plugin for a Jeelabs Jeenodes
      > +xPL::Dock::Jeenodes2 - xPL::Dock plugin for a Jeelabs Jeenodes2
      >
      > =head1 SYNOPSIS
      >
      > - use xPL::Dock qw/Jeenodes/;
      > + use xPL::Dock qw/Jeenodes2/;
      > my $xpl = xPL::Dock->new();
      > $xpl->main_loop();
      >
      > @@ -92,7 +92,7 @@
      > # Init the buffer that will be used for serial data reception
      > $self->{_uart_rx_buffer} = "";
      >
      > - $self->{_jeenodes}->{connected} = 0;
      > + $self->{_jeenodes2}->{connected} = 0;
      >
      > # Init
      > $self->stick_init();
      >
    • Show all 7 messages in this topic