blib/lib/Template/Stash/XS.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 34 CC 1 SCAR 6.9
CC
1
Cov
0%
DESTROY
2.0
AUTOLOAD
2.0
BEGIN
2.0
CRAP 2.0
1 #============================================================= -*-Perl-*-
2 #
3 # Template::Stash::XS
4 #
5 # DESCRIPTION
6 #
7 # Perl bootstrap for XS module. Inherits methods from
8 # Template::Stash when not implemented in the XS module.
9 #
10 #========================================================================
11  
12 package Template::Stash::XS;
13  
14 use strict;
15 use warnings;
16 use Template;
17 use Template::Stash;
18 use XSLoader;
19  
20 our $AUTOLOAD;
21  
22 our @ISA = qw( Template::Stash );
23  
24 XSLoader::load 'Template::Stash::XS', $Template::VERSION;
25  
26 sub DESTROY {
27 # no op
28 1;
29 }
30  
31 # catch missing method calls here so perl doesn't barf
32 # trying to load *.al files
33  
34 sub AUTOLOAD {
35 my ($self, @args) = @_;
36 my @c = caller(0);
37 my $auto = $AUTOLOAD;
38  
39 $auto =~ s/.*:://;
40 $self =~ s/=.*//;
41  
42 die "Can't locate object method \"$auto\"" .
43 " via package \"$self\" at $c[1] line $c[2]\n";
44 }
45  
46 1;
47  
48 __END__