Skip to content

Commit

Permalink
perl: capitalize the modules
Browse files Browse the repository at this point in the history
  • Loading branch information
asarhaddon committed Aug 27, 2024
1 parent 57e1219 commit 922ff02
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 35 deletions.
14 changes: 6 additions & 8 deletions impls/perl/core.pm → impls/perl/Core.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
## no critic (NamingConventions::Capitalization)
package core;
## use critic
package Core;
use re '/msx';
use strict;
use warnings;
Expand All @@ -9,11 +7,11 @@ use English '-no_match_vars';
use Hash::Util qw(fieldhash);
use Time::HiRes qw(time);

use readline qw(mal_readline);
use types qw(equal_q thaw_key nil true false);
use reader qw(read_str);
use printer qw(pr_list);
use interop qw(pl_to_mal);
use Readline qw(mal_readline);
use Types qw(equal_q thaw_key nil true false);
use Reader qw(read_str);
use Printer qw(pr_list);
use Interop qw(pl_to_mal);

use Exporter 'import';
our @EXPORT_OK = qw(%NS);
Expand Down
2 changes: 1 addition & 1 deletion impls/perl/Env.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use warnings;
use Exporter 'import';
our @EXPORT_OK = ();

use types;
use Types;

sub new {
my ( $class, $outer, $binds, $exprs ) = @_;
Expand Down
6 changes: 2 additions & 4 deletions impls/perl/interop.pm → impls/perl/Interop.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
## no critic (NamingConventions::Capitalization)
package interop;
## use critic
package Interop;
use re '/msx';
use strict;
use warnings;
Expand All @@ -9,7 +7,7 @@ use Exporter 'import';
our @EXPORT_OK = qw( pl_to_mal );
use Scalar::Util qw(looks_like_number);

use types qw(nil);
use Types qw(nil);

sub pl_to_mal {
my ($obj) = @_;
Expand Down
13 changes: 10 additions & 3 deletions impls/perl/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
SOURCES_BASE = readline.pm types.pm reader.pm printer.pm \
interop.pm
SOURCES_LISP = Env.pm core.pm stepA_mal.pl
SOURCES_BASE = \
Readline.pm \
Types.pm \
Reader.pm \
Printer.pm \
Interop.pm
SOURCES_LISP = \
Env.pm \
Core.pm \
stepA_mal.pl
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)

all:
Expand Down
6 changes: 2 additions & 4 deletions impls/perl/printer.pm → impls/perl/Printer.pm
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
## no critic (NamingConventions::Capitalization)
package printer;
## use critic
package Printer;
use re '/msx';
use strict;
use warnings;

use Exporter 'import';
our @EXPORT_OK = qw( pr_list pr_str );

use types qw(thaw_key);
use Types qw(thaw_key);

use List::Util qw(pairmap);

Expand Down
6 changes: 2 additions & 4 deletions impls/perl/reader.pm → impls/perl/Reader.pm
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
## no critic (NamingConventions::Capitalization)
package reader;
## use critic
package Reader;
use re '/msx';
use strict;
use warnings;

use Exporter 'import';
our @EXPORT_OK = qw( read_str );

use types qw(nil true false);
use Types qw(nil true false);

my $separators = <<'EOF';
(?: [\s,] | ; [^\n]* \n )*
Expand Down
4 changes: 1 addition & 3 deletions impls/perl/readline.pm → impls/perl/Readline.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
# Term::ReadKey and either Term::ReadLine::Gnu (GPL) or
# Term::ReadLine::Perl (GPL, Artistic) from CPAN.

## no critic (NamingConventions::Capitalization)
package readline;
## use critic
package Readline;
use re '/msx';
use strict;
use warnings;
Expand Down
4 changes: 1 addition & 3 deletions impls/perl/types.pm → impls/perl/Types.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
## no critic (NamingConventions::Capitalization)
package types;
## use critic
package Types;
use re '/msx';
use strict;
use warnings;
Expand Down
10 changes: 5 additions & 5 deletions impls/perl/stepA_mal.pl
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
use List::Util qw(pairs pairmap);
use Scalar::Util qw(blessed);

use readline qw(mal_readline set_rl_mode);
use types qw(nil false);
use reader qw(read_str);
use printer qw(pr_str);
use Readline qw(mal_readline set_rl_mode);
use Types qw(nil false);
use Reader qw(read_str);
use Printer qw(pr_str);
use Env;
use core qw(%NS);
use Core qw(%NS);

# False positives because of TCO.
## no critic (Subroutines::RequireArgUnpacking)
Expand Down

0 comments on commit 922ff02

Please sign in to comment.