Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't subclass from perl5 package #184

Open
DarthGandalf opened this issue Dec 2, 2023 · 0 comments
Open

Can't subclass from perl5 package #184

DarthGandalf opened this issue Dec 2, 2023 · 0 comments

Comments

@DarthGandalf
Copy link

DarthGandalf commented Dec 2, 2023

use lib:from<Perl5> '../libp5/lib/perl5';
use AI::Pathfinding::AStar:from<Perl5>;

class MyStar is AI::Pathfinding::AStar {
	method getSurrounding {
	}
}

my $map = MyStar.new;
my $path = $map.findPath(1, 2);

Can't locate object method "doAStar" via package "MyStar" at ../libp5/lib/perl5/AI/Pathfinding/AStar.pm line 102.

doAStar is called internally by findPath, and it exists in the package AI::Pathfinding::AStar

Perhaps generation of @ISA doesn't work properly?

Environment: Gentoo Linux, Rakudo v2023.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant