Commit 3a7523d4 authored by Stefan Tauner's avatar Stefan Tauner
Browse files

Refine required Perl packages

 - Switch is only used once in the code and easily substituted by some
   if-elsif-else clauses... thus remove it.
 - Add usage information to all other packages in the documentation
   where it was missing.
parent 2f8a7e46
......@@ -34,8 +34,6 @@ package FIJI::Connection;
use strict;
use warnings;
use Switch;
use Log::Log4perl qw(get_logger);
use Digest::CRC "crc";
use Time::HiRes "usleep";
......@@ -627,11 +625,15 @@ sub _parse_return_message {
}
}
switch (($message_byte >> 5) & 0x03) {
case 0x01 { return 'CONF_DONE'; }
case 0x02 { return 'READY'; }
case 0x03 { return 'UNDERRUN'; }
else { return undef; }
my $retmsg_type = ($message_byte >> 5) & 0x03;
if ($retmsg_type == 0x01) {
return 'CONF_DONE';
} elsif ($retmsg_type == 0x02) {
return 'READY';
} elsif ($retmsg_type == 0x03) {
return 'UNDERRUN';
} else {
return undef;
}
}
......
......@@ -31,9 +31,7 @@ package FIJI::Netlist;
use strict;
use warnings;
use diagnostics;
use Scalar::Util 'blessed';
use List::Util qw[min max];
use Log::Log4perl qw(get_logger :easy);
use File::Basename qw(basename);
......
......@@ -26,7 +26,6 @@
use strict;
use warnings;
use diagnostics;
use FindBin;
use lib "$FindBin::Bin";
......
......@@ -41,7 +41,6 @@ Log::Dispatch::Output ^
Log::Log4perl ^
Params::Validate ^
Scalar::Util ^
Switch ^
Test::Deep ^
Time::HiRes ^
Tk ^
......
......@@ -25,7 +25,6 @@ Log::Dispatch::Output
Log::Log4perl
Params::Validate
Scalar::Util
Switch
Test::Deep
Time::HiRes
Tk
......
......@@ -32,20 +32,19 @@ which can be found in Table~\ref{tab:perlmod}.
Module & Description & Version & \ac{FIJI} Tool \\
\midrule
Clone & Deep object copy & tbd & All tools \\
Config::Simple & INI-style configuration file parsing & tbd & All tools \\
Config::Simple & INI-style configuration files & tbd & All tools \\
enum & Enumerated types & tbd & All tools \\
Device::SerialPort & Serial communication mapping for Unix/Linux & tbd & \textit{\ac{FIJI} Download + GUI} \\
Digest::CRC & CRC calculation & tbd & \textit{\ac{FIJI} Instrument}, \textit{\ac{FIJI} Download + GUI} \\
Doxygen::Filter::Perl & Doxygen documentation output & tbd & All tools \\
Log::Log4Perl & Easy logging & tbd & All tools \\
Log::Dispatch::Output & Base class for custom log appenders & tbd & \textit{\ac{FIJI} Download GUI} \\
Params::Validate & ??? & tbd & ??? \\
Scalar::Util & ??? & tbd & ??? \\
Switch & Switch statement support & tbd & ??? \\
Test::Deep & Deep hash comparison & tbd & \textit{\ac{FIJI} Setup}, \textit{\ac{FIJI} Download GUI} \\
Tk & Graphical User Interface library & tbd & \textit{\ac{FIJI} Setup}, \textit{\ac{FIJI} Download GUI} \\
Tk::StatusBar & StatusBar widget for Tk & tbd & \textit{\ac{FIJI} Setup}, \textit{\ac{FIJI} Download GUI} \\
Verilog::Language & Verilog parser/generator & 99 & \textit{\ac{FIJI} Setup}, \textit{\ac{FIJI} Instrument} \\
Device::SerialPort & Serial port name mapping & tbd & \textit{Download (+GUI)} \\
Digest::CRC & CRC calculation & tbd & \textit{Instrument}, \textit{Download (+GUI)} \\
Doxygen::Filter::Perl & Doxygen documentation & tbd & All tools \\
Log::Log4Perl & Logging & tbd & All tools \\
Log::Dispatch::Output & Base for custom log appenders & tbd & \textit{Download GUI} \\
Params::Validate & Validation of parameters & tbd & \textit{Download GUI} \\
Scalar::Util & Mainly for \texttt{blessed()} & tbd & All tools \\
Test::Deep & Deep hash comparison & tbd & \textit{Setup}, \textit{Download GUI} \\
Tk & GUI library & tbd & \textit{Setup}, \textit{Download GUI} \\
Tk::StatusBar & StatusBar widget for Tk & tbd & \textit{Setup}, \textit{Download GUI} \\
Verilog::Language & Verilog parser/generator & custom & \textit{Setup}, \textit{Instrument} \\
\bottomrule
\end{tabular}
\end{center}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment