Commit c7749ca9 authored by Stefan Tauner's avatar Stefan Tauner
Browse files

Use Sort::Naturally to sort FIU entries when saving

parent 330b3be9
package FIJI::ConfigSorted;
use Config::Simple;
use Sort::Naturally;
# Set version information
use vars qw($VERSION);
......@@ -19,7 +20,7 @@ sub as_string {
if ($syntax eq 'ini') {
$STRING .= "; FIJI::ConfigSorted $VERSION\n";
$STRING .= "; $currtime\n\n";
for my $block_name (sort keys %{$self->{_DATA}}) {
for my $block_name (nsort(keys %{$self->{_DATA}})) {
my $key_values = $self->{_DATA}->{$block_name};
unless ($sub_syntax eq 'simple-ini') {
$STRING .= sprintf("[%s]\n", $block_name);
......
......@@ -41,6 +41,7 @@ Log::Dispatch::Output ^
Log::Log4perl ^
Params::Validate ^
Scalar::Util ^
Sort::Naturally ^
Test::Deep ^
Time::HiRes ^
Tk ^
......
......@@ -25,6 +25,7 @@ Log::Dispatch::Output
Log::Log4perl
Params::Validate
Scalar::Util
Sort::Naturally
Test::Deep
Time::HiRes
Tk
......
......@@ -9,7 +9,7 @@ Win32::SerialPort & Serial port interface for Windows \\
Device::SerialPort & Serial port interface for Unix \\
Scalar::Util & Various numeric helpers \\
Config::Simple & Configuration file handling \\
Switch & Switch construct \\
Sort::Naturally & Natural sorting of alphanumerics \\
Digest::CRC & CRC calculation \\
Time::HiRes & High-resolution timing \\
Doxygen::Filter::Perl & Perl support for Doxygen documentation \\
......
......@@ -34,6 +34,7 @@ which can be found in \Cref{tab:perlmod}.
\midrule
Clone & Deep object copy & All tools \\
Config::Simple & Configuration file handling & All tools \\
Sort::Naturally & Natural sorting of alphanumerics & All tools \\
enum & Enumerated types & All tools \\
Win32::SerialPort & Serial port interface for Windows & \textit{\acs{FIJIEE}} \\
Device::SerialPort & Serial port name mapping & \textit{\acs{FIJIEE}} \\
......@@ -102,12 +103,13 @@ After that the following Perl packages remain to be installed from CPAN:
\item Config::Simple
\item Digest::CRC
\item Doxygen::Filter::Perl
\item Sort::Naturally
\item Tk::StatusBar
\end{itemize}
That can be handled with the following command within a Cygwin shell.
\begin{lstlisting}
perl -MCPAN -e "CPAN::Shell->notest('install', 'enum', 'Log::Dispatch::Output', 'Config::Simple', 'Digest::CRC', 'Doxygen::Filter::Perl', 'Tk::StatusBar')"
perl -MCPAN -e "CPAN::Shell->notest('install', 'enum', 'Log::Dispatch::Output', 'Config::Simple', 'Digest::CRC', 'Doxygen::Filter::Perl', 'Sort::Naturally', 'Tk::StatusBar')"
\end{lstlisting}
Finally, you need also to install Verilog-Perl as shown in \Cref{sec:verilog-perl-install}.
......
Markdown is supported
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