Re: require on string stopped working in rakudo 2015.09

2015-09-26 Thread Moritz Lenz
Hi,

On 09/26/2015 06:47 AM, Gabor Szabo wrote:
> Hi,
> 
> I am really glad Rakudo finally came out.
> I've installed in and tried to run the tests of Perl6::Maven.
> 
> They quickly failed as I have been using 'require' on string
> to check if all the module compile properly.
> 
> The following code now fails:
> 
> use v6;
> my $name = 'Bailador';
> require $name;
> 
> 
> even though
> 
> require Bailador;
> 
> works.
> 
> In 2015.07 both worked.

I stumbled across the same thing in DBIish, and was told that the proper
way to require a module name (and not a file name) is

require ::($name);

which does work in 2015.09.

I guess there's no deprecation, because it was only an accident that the
string form worked before.

Cheers,
Moritz


Re: require on string stopped working in rakudo 2015.09

2015-09-26 Thread Elizabeth Mattijsen
> On 26 Sep 2015, at 06:47, Gabor Szabo  wrote:
> I am really glad Rakudo finally came out.
> I've installed in and tried to run the tests of Perl6::Maven.
> 
> They quickly failed as I have been using 'require' on string
> to check if all the module compile properly.
> 
> The following code now fails:
> 
> use v6;
> my $name = 'Bailador';
> require $name;
> 
> 
> even though
> 
> require Bailador;
> 
> works.
> 
> In 2015.07 both worked.
> 
> 
> I've fixed my script by switching to EVAL "use $module";
> but I wonder if this is a regression or a planned deprecation?

I’m not sure yet.

Could you please rakudobug it so that it doesn’t fall through the cracks?  This 
change did not fire any spectest alarm either, so maybe we need a test for it 
as well  :-)



Liz

Re: require on string stopped working in rakudo 2015.09

2015-09-26 Thread Moritz Lenz

On 09/26/2015 01:07 PM, Elizabeth Mattijsen wrote:
>> On 26 Sep 2015, at 06:47, Gabor Szabo  wrote:
>> I am really glad Rakudo finally came out.
>> I've installed in and tried to run the tests of Perl6::Maven.
>> 
>> They quickly failed as I have been using 'require' on string
>> to check if all the module compile properly.
>> 
>> The following code now fails:
>> 
>> use v6;
>> my $name = 'Bailador';
>> require $name;
>> 
>> 
>> even though
>> 
>> require Bailador;
>> 
>> works.
>> 
>> In 2015.07 both worked.
>> 
>> 
>> I've fixed my script by switching to EVAL "use $module";
>> but I wonder if this is a regression or a planned deprecation?
> 
> I’m not sure yet.
> 
> Could you please rakudobug it so that it doesn’t fall through the cracks?  
> This change did not fire any spectest alarm either, so maybe we need a test 
> for it as well  :-)

I've opened https://rt.perl.org/Ticket/Display.html?id=126096 and later
rejcted it when learning about the desired behavior.

Cheers,
Moritz


Re: require on string stopped working in rakudo 2015.09

2015-09-26 Thread Gabor Szabo
On Sat, Sep 26, 2015 at 3:39 PM, Moritz Lenz  wrote:

>
> >> I've fixed my script by switching to EVAL "use $module";
> >> but I wonder if this is a regression or a planned deprecation?
> >
> > I’m not sure yet.
> >
> > Could you please rakudobug it so that it doesn’t fall through the
> cracks?  This change did not fire any spectest alarm either, so maybe we
> need a test for it as well  :-)
>
> I've opened https://rt.perl.org/Ticket/Display.html?id=126096 and later
> rejcted it when learning about the desired behavior.
>
>

Thanks for all the replies. I stick with EVAL for now.

BTW  http://doc.perl6.org/ does not know about 'require' at all.   (nor
seems to know about 'use'). nor EVAL.

Gabor


require on string stopped working in rakudo 2015.09

2015-09-25 Thread Gabor Szabo
Hi,

I am really glad Rakudo finally came out.
I've installed in and tried to run the tests of Perl6::Maven.

They quickly failed as I have been using 'require' on string
to check if all the module compile properly.

The following code now fails:

use v6;
my $name = 'Bailador';
require $name;


even though

require Bailador;

works.

In 2015.07 both worked.


I've fixed my script by switching to EVAL "use $module";
but I wonder if this is a regression or a planned deprecation?

Gabor