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

"Could not find symbol" error occurs when you use module A::B::C within A::B's class definition #5340

Open
p6rt opened this issue May 27, 2016 · 6 comments

Comments

@p6rt
Copy link

p6rt commented May 27, 2016

Migrated from rt.perl.org#128268 (status was 'open')

Searchable as RT128268$

@p6rt
Copy link
Author

p6rt commented May 27, 2016

From @hoelzro

I found this issue when trying to use XML​::Query; the attached tarball has a golfed-down example. I've also attached a picture that illustrates the "use" relationship between the various units.

When I try to run test.pl in the tarball, I get the following error​:

===SORRY!===
Could not find symbol '&B'

Disabling precompilation fixes the issue, as does rearranging the contents of lib/Common/A.pm so that "use Common​::A​::B" comes before "unit class Common​::A". Removing any seemingly superfluous use statement fixes the issue, so it appears this is one of those wacky dependency graph + precomp bugs.

@p6rt
Copy link
Author

p6rt commented May 27, 2016

From @hoelzro

test-module.png

@p6rt
Copy link
Author

p6rt commented May 27, 2016

From @hoelzro

test-module.tar.xz

@p6rt
Copy link
Author

p6rt commented May 28, 2016

From @LLFourn

Looks similar to RT #​128156.

https://rt.perl.org/Public/Bug/Display.html?id=128156

On Fri, May 27, 2016 at 10​:49 PM Rob Hoelz <perl6-bugs-followup@​perl.org>
wrote​:

# New Ticket Created by Rob Hoelz
# Please include the string​: [perl #​128268]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=128268 >

I found this issue when trying to use XML​::Query; the attached tarball has
a golfed-down example. I've also attached a picture that illustrates the
"use" relationship between the various units.

When I try to run test.pl in the tarball, I get the following error​:

===SORRY!===
Could not find symbol '&B'

Disabling precompilation fixes the issue, as does rearranging the contents
of lib/Common/A.pm so that "use Common​::A​::B" comes before "unit class
Common​::A". Removing any seemingly superfluous use statement fixes the
issue, so it appears this is one of those wacky dependency graph + precomp
bugs.

@p6rt
Copy link
Author

p6rt commented May 28, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jul 8, 2016

From @zoffixznet

While RT#​128156 is now marked as resolved, this bug is still present​:

zoffix@​leliana​:~/CPANPRC/rakudo$ ./perl6-m -v
This is Rakudo version 2016.05-361-gd1ebac0 built on MoarVM version 2016.06-9-g8fc21d5
implementing Perl 6.c.

zoffix@​leliana​:~/CPANPRC/rakudo$ ./perl6-m -Iz/test-module/lib/ z/test-module/test.pl
===SORRY!===
Could not find symbol '&B'

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