You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A syntax error is generated when using inline POD.
I have created the following small test script.
package Pod {
use Zydeco;
class Test {
has foo = 0;
method bar() = self->foo();
=pod
=cut
method baz() = self->foo();
}
}
use strict;
use warnings;
use Test::More;
isa_ok Pod::Test->new(), 'Pod::Test';
done_testing;
This is the associated error message
syntax error at H:\temp\Perl\test.pl line 8, near ";="
Global symbol "$self" requires explicit package name (did you forget to declare "my $self"?) at H:\temp\Perl\test.pl line 12.
BEGIN not safe after errors--compilation aborted at H:\temp\Perl\test.pl line 14.
I am using the current Zydeco library version and Perl version 5.26.3. Compiling and testing succeeds without a POD or if line 6 is changed as follows:
method bar() { $self->foo() };
or
method bar() = $self->foo();;
Please note that in this case the additional semicolon must be used at the end.
ok 1 - An object of class 'Pod::Test' isa 'Pod::Test'
1..1
The text was updated successfully, but these errors were encountered:
Yes, that's right, there is a typo in my message. The script uses $self. Here as copy & paste
package Pod {
use Zydeco;
class Test {
has foo = 0;
method bar() = $self->foo();
;#fix pod bug
=pod
=cut
method baz() = $self->foo();
}
}
use strict;
use warnings;
use Test::More;
isa_ok Pod::Test->new(), 'Pod::Test';
done_testing;
A syntax error is generated when using inline POD.
I have created the following small test script.
This is the associated error message
I am using the current Zydeco library version and Perl version 5.26.3. Compiling and testing succeeds without a POD or if line 6 is changed as follows:
or
Please note that in this case the additional semicolon must be used at the end.
The text was updated successfully, but these errors were encountered: