# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #128457]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=128457 >


If a Perl 6 module and a Perl 5 module are used in the same class, using that 
class fails.

Here's some tests done:

* I tried several Perl 6 and Perl 5 modules and the effect is the same
* If I combine a Perl 5 module with one of the modules shipped with Rakudo 
(Test, Pod::To::Text), the error is gone
* If I comment out one of the use lines, run the program so it precompiles the 
module (without error this time), and then uncomment that use line, any further 
changes to the file (like adding a method) get ignored.

zoffix@VirtualBox:~/CPANPRC/Ticket-Trakr$ cat lib/Ticket/Trakr/Tickets.pm6 
unit class Ticket::Trakr::Tickets;

use DBIish;
use Mojo::PDF:from<Perl5>;
zoffix@VirtualBox:~/CPANPRC/Ticket-Trakr$ rm -fr lib/.precomp/
zoffix@VirtualBox:~/CPANPRC/Ticket-Trakr$ perl6 -Ilib -MTicket::Trakr::Tickets 
-e 'Ticket::Trakr::Tickets.new'
Could not find symbol '&Tickets'
  in block <unit> at -e line 1

Actually thrown at:
  in block <unit> at -e line 1

zoffix@VirtualBox:~/CPANPRC/Ticket-Trakr$ 


Notice how adding the Perl 5 module after precompiling with just one `use` no 
longer triggers the error, but the added `update` method isn't there either:

zoffix@VirtualBox:~/CPANPRC/Ticket-Trakr$ rm -fr lib/.precomp/
zoffix@VirtualBox:~/CPANPRC/Ticket-Trakr$ cat lib/Ticket/Trakr/Tickets.pm6 
unit class Ticket::Trakr::Tickets;
use DBIish;
zoffix@VirtualBox:~/CPANPRC/Ticket-Trakr$ perl6 -Ilib -MTicket::Trakr::Tickets 
-e 'Ticket::Trakr::Tickets.new'                                                 
                                                                                
                
zoffix@VirtualBox:~/CPANPRC/Ticket-Trakr$ cat lib/Ticket/Trakr/Tickets.pm6      
                                                                                
                                                                                
               
unit class Ticket::Trakr::Tickets;

use DBIish;
use Mojo::PDF:from<Perl5>;

method update {
}
zoffix@VirtualBox:~/CPANPRC/Ticket-Trakr$ perl6 -Ilib -MTicket::Trakr::Tickets 
-e 'Ticket::Trakr::Tickets.new'
zoffix@VirtualBox:~/CPANPRC/Ticket-Trakr$ perl6 -Ilib -MTicket::Trakr::Tickets 
-e 'Ticket::Trakr::Tickets.new.update'
Method 'update' not found for invocant of class 'Ticket::Trakr::Tickets'
  in block <unit> at -e line 1

zoffix@VirtualBox:~/CPANPRC/Ticket-Trakr$ 


Reply via email to