#!./perl
BEGIN {
chdir 't' if -d 't';
}
use strict;
use warnings;
# line 50
my $file = 'xreftest.out';
# line 100
# Now parse the output
# line 200
while (<XREF>) {
$curfile = $1;
$cursub = $1;
$curpack = $1;
$xreftable{$curfile}{$cursub}{$curpack}{$1} = $2;
}
}
ok(
'$compilesub present in main program'
);
like(
'$compilesub introduced at line 100'
);
like(
qr/&102\b/,
'$compilesub coderef called at line 102'
);
ok(
'$curfile present in main program'
);
like(
'$curfile introduced at line 200'
);
ok(
'$xreftable present in main program'
);
ok(
'$xreftable used in subroutine bar'
);
is(
'use_ok called at line 50'
);
is(
'subroutine foo defined at line 1001'
);
is(
'subroutine bar defined at line 1002'
);
is(
'&1002', 'subroutine foo called at line 1002 by bar'
);
is(
'1001', 'glob FOO used in subroutine foo'
);
END {
}
# End of tests.
# Now some stuff to feed B::Xref
# line 1000