@@ -410,6 +410,11 @@ sub each_pick {
410
410
for my $block (@{$self -> {ast }{data }}) {
411
411
$self -> {block } = $block ;
412
412
413
+ if (defined $block -> {ONLY } and not $self -> {warned_only }) {
414
+ $self -> err(" Warning: TestML 'ONLY' in use." );
415
+ $self -> {warned_only } = true;
416
+ }
417
+
413
418
$self -> exec_expr([' <>' , $list , $expr ]);
414
419
}
415
420
@@ -422,7 +427,7 @@ sub pick_exec {
422
427
my ($self , $list , $expr ) = @_ ;
423
428
424
429
my $pick = 1;
425
- if (my $when = $self -> {block }{point }{ WHEN }) {
430
+ if (my $when = $self -> {block }{WHEN }) {
426
431
if ($when =~ / ^Env:(\w +)$ / ) {
427
432
$pick = 0 unless $ENV {$1 };
428
433
}
@@ -432,9 +437,9 @@ sub pick_exec {
432
437
for my $point (@$list ) {
433
438
if (
434
439
($point =~ / ^\* / and
435
- not exists $self -> {block }{point }{ substr ($point , 1)}) or
440
+ not exists $self -> {block }{substr ($point , 1)}) or
436
441
($point =~ / ^!*/ ) and
437
- exists $self -> {block }{point }{ substr ($point , 2)}
442
+ exists $self -> {block }{substr ($point , 2)}
438
443
) {
439
444
$pick = 0;
440
445
last ;
@@ -512,7 +517,7 @@ sub or_set_var {
512
517
sub getp {
513
518
my ($self , $name ) = @_ ;
514
519
return unless $self -> {block };
515
- my $value = $self -> {block }{point }{ $name };
520
+ my $value = $self -> {block }{$name };
516
521
$self -> exec ($value ) if defined $value ;
517
522
}
518
523
@@ -607,8 +612,8 @@ sub get_label {
607
612
608
613
my $block_label = (
609
614
defined ($self -> {block }) and
610
- defined ($self -> {block }{label })
611
- ) ? $self -> {block }{label }
615
+ defined ($self -> {block }{Label })
616
+ ) ? $self -> {block }{Label }
612
617
: ' ' ;
613
618
614
619
if ($label ) {
@@ -668,7 +673,7 @@ sub transform1 {
668
673
sub transform2 {
669
674
my ($self , $name , $label ) = @_ ;
670
675
return ' ' unless $self -> {block };
671
- my $value = $self -> {block }{point }{ $name };
676
+ my $value = $self -> {block }{$name };
672
677
return ' ' unless defined $value ;
673
678
$self -> transform($value , $label );
674
679
}
0 commit comments