This file is indexed.

/usr/share/perl5/Aspect/Legacy.pm is in libaspect-perl 1.04-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
package Aspect::Legacy;

=pod

=head1 NAME

Aspect::Legacy - Legacy Compatibility for Aspect.pm

=head1 DESCRIPTION

B<Aspect::Legacy> implements emulated support for the L<Aspect> module as it
existed in various forms prior to the 1.00 release in 2010.

This includes both full legacy support for the original Ran Eilam release series
ending in release 0.12, and for code written against the 0.16 to 0.99
development release series.

In it's default usage, it is intended as a drop-in upgrade for any old
Aspect-oriented code broken by changes in the second-generation
(version 0.90 or later) implementation created during 2010. To upgrade our old
code, simple change C<use Aspect;> to C<use Aspect::Legacy;> and it should
continue to function as normal.

=cut

use strict;
use Aspect   ();
use Exporter ();

our $VERSION   = '1.04';
our @ISA       = 'Exporter';
our @EXPORT    = qw( aspect before after call cflow );
our $INSTALLED = 0;

# Install deprecated functionality
*Aspect::after_throwing       = *Aspect::Legacy::after_throwing;
*Aspect::after_returning      = *Aspect::Legacy::after_returning;
*Aspect::Point::params        = *Aspect::Legacy::params;
*Aspect::Point::params_ref    = *Aspect::Legacy::params_ref;
*Aspect::Point::append_param  = *Aspect::Legacy::append_param;
*Aspect::Point::append_params = *Aspect::Legacy::append_params;

# Namespace aliasing to old names
*Aspect::if_true               = *Aspect::true;
*Aspect::Point::short_sub_name = *Aspect::Point::short_name;
*Aspect::Point::run_original   = *Aspect::Point::proceed;
*Aspect::Modular::params       = *Aspect::Modular::args;

# Copy original functions into this namespace so they can be exported
*Aspect::Legacy::call   = *Aspect::call;
*Aspect::Legacy::cflow  = *Aspect::cflow;
*Aspect::Legacy::before = *Aspect::before;
*Aspect::Legacy::after  = *Aspect::Legacy::after_returning;
*Aspect::Legacy::aspect = *Aspect::aspect;





######################################################################
# Deprecated Functionality

# Aspect::advice
sub advice {
	my $type = shift;
	if ( $type eq 'before' ) {
		return before(@_);
	} else {
		return after(@_);
	}
}

# Aspect::after_returning
sub after_returning (&$) {
	Aspect::Advice::After->new(
		lexical  => defined wantarray,
		code     => $_[0],
		pointcut => Aspect::Pointcut::And->new(
			Aspect::Pointcut::Returning->new,
			$_[1],
		),
	);
}

# Aspect::after_throwing
sub after_throwing (&$) {
	Aspect::Advice::After->new(
		lexical  => defined wantarray,
		code     => $_[0],
		pointcut => Aspect::Pointcut::And->new(
			Aspect::Pointcut::Throwing->new,
			$_[1],
		),
	);
}

# Aspect::Point::params_ref
sub params_ref {
	$_[0]->{args};
}

# Aspect::Point::params
sub params {
	$_[0]->{args} = [ @_[1..$#_] ] if @_ > 1;
	return CORE::wantarray
		? @{$_[0]->{args}}
		: $_[0]->{args};
}

# Aspect::Point::append_param
sub append_param {
	my $self = shift;
	$self->args( $self->args, @_ );
}

# Aspect::Point::append_params
sub append_params {
	my $self = shift;
	$self->args( $self->args, @_ );
}

=pod

=head1 AUTHORS

Adam Kennedy E<lt>adamk@cpan.orgE<gt>

=head1 COPYRIGHT

Copyright 2009 - 2013 Adam Kennedy.

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut