line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
3493
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
63
|
|
2
|
2
|
|
|
2
|
|
7
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
113
|
|
3
|
|
|
|
|
|
|
package Devel::REPL::Plugin::Refresh; |
4
|
|
|
|
|
|
|
# ABSTRACT: Reload libraries with Module::Refresh |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.003028'; |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
8
|
use Devel::REPL::Plugin; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
13
|
|
9
|
2
|
|
|
2
|
|
6187
|
use namespace::autoclean; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
14
|
|
10
|
2
|
|
|
2
|
|
542
|
use Module::Refresh; |
|
2
|
|
|
|
|
873
|
|
|
2
|
|
|
|
|
135
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# before evaluating the code, ask Module::Refresh to refresh |
13
|
|
|
|
|
|
|
# the modules that have changed |
14
|
|
|
|
|
|
|
around 'eval' => sub { |
15
|
|
|
|
|
|
|
my $orig = shift; |
16
|
|
|
|
|
|
|
my ($self, $line) = @_; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# first refresh the changed modules |
19
|
|
|
|
|
|
|
Module::Refresh->refresh; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# the eval the code |
22
|
|
|
|
|
|
|
return $self->$orig($line); |
23
|
|
|
|
|
|
|
}; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=pod |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=encoding UTF-8 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Devel::REPL::Plugin::Refresh - Reload libraries with Module::Refresh |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 VERSION |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
version 1.003028 |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 SUPPORT |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=Devel-REPL> |
44
|
|
|
|
|
|
|
(or L<bug-Devel-REPL@rt.cpan.org|mailto:bug-Devel-REPL@rt.cpan.org>). |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
There is also an irc channel available for users of this distribution, at |
47
|
|
|
|
|
|
|
L<C<#devel> on C<irc.perl.org>|irc://irc.perl.org/#devel-repl>. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 AUTHOR |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co.uk/>) |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENCE |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
This software is copyright (c) 2007 by Matt S Trout - mst (at) shadowcatsystems.co.uk (L<http://www.shadowcatsystems.co.uk/>). |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
58
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=cut |