5 More Discussions You Might Find Interesting
1. HP-UX
Hi, I am new to the Unix world and in my current project i have to work on HP MPE/iX and MF-COBOL. They do not have a Change management and version controller till now. Can you please help me with the name of the product which can fit well in this purpose. Please advice. Ty. (1 Reply)
Discussion started by: mohbaig
1 Replies
2. Solaris
i want to know the system components of solaris 11.
for SLES11 system components are
Linux Kernel 2.6.27.8rc1
GCC 4.3.2
glibc 2.9
X.Org 7.4
XEN 3.3.1
KVM 78
i need those components for solaris 11 (4 Replies)
Discussion started by: snreddy_gopu
4 Replies
3. UNIX for Advanced & Expert Users
Hi,
I am currently working on a project involving writing reusable modular components from basic like generic sort script to doing rigorous data matching involving millions of data in a flat file.
Can you help me understand what sort of architecture and scripting languages can be explored??
... (1 Reply)
Discussion started by: dikesm
1 Replies
4. UNIX for Dummies Questions & Answers
What is the components of semaphore? (1 Reply)
Discussion started by: dearanik
1 Replies
5. Programming
I want to do kernel programming.So which site or books help me in studying these.I know C programming to a little extent.Please advice me (4 Replies)
Discussion started by: ranjith
4 Replies
LEARN ABOUT DEBIAN
aspect::modular
Aspect::Modular(3pm) User Contributed Perl Documentation Aspect::Modular(3pm)
NAME
Aspect::Modular - First generation base class for reusable aspects
SYNOPSIS
# Subclassing to create a reusable aspect
package Aspect::Library::ConstructorTracer;
use strict;
use base 'Aspect::Modular';
use Aspect::Advice::After ();
sub get_advice {
my $self = shift;
my $pointcut = shift;
return Aspect::Advice::After->new(
lexical => $self->lexical,
pointcut => $pointcut,
code => sub {
print 'Created object: ' . shift->return_value . "
";
},
);
}
# Using the new aspect
package main;
use Aspect;
# Print message when constructing new Person
aspect ConstructorTracer => call 'Person::new';
DESCRIPTION
All reusable aspect inherit from this class.
Such aspects are created in user code, using the "aspect()" sub exported by Aspect. You call "aspect()" with the class name of the reusable
aspect (it must exist in the package "Aspect::Library"), and any parameters (pointcuts, class names, code to run, etc.) the specific aspect
may require.
The Wormhole aspect, for example, expects 2 pointcut specs for the wormhole source and target, while the Profiler aspect expects a pointcut
object, to select the subs to be profiled.
You create a reusable aspect by subclassing this class, and providing one template method: "get_advice()". It is called with all the
parameters that were sent when user code created the aspect, and is expected to return Aspect::Advice object/s, that will be installed
while the reusable aspect is still in scope. If the "aspect()" sub is called in void context, the reusable aspect is installed until class
reloading or interpreter shutdown.
Typical things a reusable aspect may want to do:
o Install advice on pointcuts specified by the caller
o Push (vs. OOP pull) subs and base classes into classes specified by the caller
AUTHORS
Adam Kennedy <adamk@cpan.org>
Marcel Gruenauer <marcel@cpan.org>
Ran Eilam <eilara@cpan.org>
COPYRIGHT
Copyright 2001 by Marcel Gruenauer
Some parts copyright 2009 - 2012 Adam Kennedy.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-02-01 Aspect::Modular(3pm)