Commits

Anonymous committed 70cc047

Convert mk_accessors to mk_acc_ref.

Also got rid of Class::Accessor remnants.

Comments (0)

Files changed (7)

nurikabe-solver/Games-Nurikabe-Solver/lib/Games/Nurikabe/Solver/Board.pm

 
 our $VERSION = '0.01';
 
-__PACKAGE__->mk_accessors(qw(
+__PACKAGE__->mk_acc_ref([qw(
     _cells
     _expected_totals
     _found_totals
     _moves
     _verdict_marked_cells
     _width
-    ));
+    )]);
 
 =head1 SYNOPSIS
 

nurikabe-solver/Games-Nurikabe-Solver/lib/Games/Nurikabe/Solver/Cell.pm

 
 our $VERSION = '0.01';
 
-__PACKAGE__->mk_accessors(qw(
+__PACKAGE__->mk_acc_ref([qw(
     status
     island
     island_in_proximity
     _reachable
     _island_reachable
     already_processed
-    ));
+    )]);
 
 =head1 SYNOPSIS
 

nurikabe-solver/Games-Nurikabe-Solver/lib/Games/Nurikabe/Solver/Coords.pm

 
 use base 'Games::Nurikabe::Solver::Base';
 
-__PACKAGE__->mk_accessors(qw(
+__PACKAGE__->mk_acc_ref([qw(
     x
     y
-    ));
+    )]
+);
 
 =head1 NAME
 

nurikabe-solver/Games-Nurikabe-Solver/lib/Games/Nurikabe/Solver/Island.pm

 
 our $VERSION = '0.01';
 
-__PACKAGE__->mk_accessors(qw(
+__PACKAGE__->mk_acc_ref([qw(
     idx
     known_cells
     order
     _queue
-    ));
+    )]);
 
 =head1 SYNOPSIS
 

nurikabe-solver/Games-Nurikabe-Solver/lib/Games/Nurikabe/Solver/Move.pm

 
 our $VERSION = '0.01';
 
-__PACKAGE__->mk_accessors(qw(
+__PACKAGE__->mk_acc_ref([qw(
     _verdicted_cells
     reason
     _reason_params
-    ));
+    )]);
 
 =head1 SYNOPSIS
 

nurikabe-solver/Games-Nurikabe-Solver/t/lib/Games/Nurikabe/Solver/Test/BoardInput.pm

 use strict;
 use warnings;
 
-use base 'Class::Accessor';
+use base 'Games::Nurikabe::Solver::Base';
 
-__PACKAGE__->mk_accessors(qw(
+__PACKAGE__->mk_acc_ref([qw(
     width
     height
     _char_positions
-    ));
+    )]);
+
+sub _init
+{
+    my ($self, $args) = @_;
+
+    $self->width($args->{width});
+    $self->height($args->{height});
+    $self->_char_positions($args->{_char_positions});
+
+    return;
+}
 
 sub from_s
 {

nurikabe-solver/Games-Nurikabe-Solver/t/solve1.t

 
 package MyMove;
 
-use base 'Class::Accessor';
+use base 'Games::Nurikabe::Solver::Base';
 
 use List::MoreUtils qw(any);
 
 use Games::Nurikabe::Solver::Constants qw($NK_UNKNOWN $NK_WHITE $NK_BLACK);
 use Games::Nurikabe::Solver::Cell;
 
-__PACKAGE__->mk_accessors(qw(move));
+__PACKAGE__->mk_acc_ref([qw(move)]);
+
+sub _init
+{
+    my ($self, $args) = @_;
+
+    $self->move($args->{move});
+
+    return;
+}
 
 sub in_black
 {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.