Sponsored Content
The Lounge War Stories The (Mis)Information Age – The End of the World as We Know It and What Vault7 Teaches Us Post 302993764 by wisecracker on Tuesday 14th of March 2017 07:29:51 AM
Old 03-14-2017
Terrific.

Do you mind me posting the URL onto another ML site?

Also why not post it to your FB page?
This User Gave Thanks to wisecracker For This Post:
 

6 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

End of Life / Life Cycle Information

Hello everyone, I was searching for locations where I can get End of Life information on multiple versions of Unix. I have found some information which I list below, what I have not found or confirmed is where I can get the information for: DEC Unix/OSF1 V4.0D NCR Unix SVR4 MP-RAS Rel 3.02.... (2 Replies)
Discussion started by: robertmcol
2 Replies

2. Shell Programming and Scripting

Need UNIX shell scripting end to end information

Hi, I would like to learn shell scripting in UNIX. Can any one please give me the support and share the information/documents with me. If any documents please post it to aswanikumar_nimmagadda@yahoo.co.in Thanks in advance...!!! (3 Replies)
Discussion started by: aswani_n
3 Replies

3. Debian

tcpdump filter (mis)behaviour

Hello, I am a bit puzzled. I am trying to capture data using tcpdump on a bonded interface, which works fine until I add a filter, then nothing is seen nor captured by libpcap/tcpump. I have interfaces eth3 and eth4 bonded to bond0 because I am using a tap in a firewall connection to monitor all... (4 Replies)
Discussion started by: Hollinch
4 Replies

4. Post Here to Contact Site Administrators and Moderators

Comments on "How Will the World End?"

I have read the sun-expansion scenario numerous places but I've never read any suggestion that the earth's orbit would increase to avoid being scorched. What mechanism would push it out? As for creating a black hole by the LHC, the whole concept is silly so any number of reasons would rule it... (9 Replies)
Discussion started by: KenJackson
9 Replies

5. What is on Your Mind?

How Will the World End?

How will the world end (someday long into the future, we hope)? (68 Replies)
Discussion started by: Neo
68 Replies

6. What is on Your Mind?

Mad World Remix of Moby Video (Are You Lost In The World Like Me)

This is an excellent video comment on modern society and the remix is good too: https://www.youtube.com/watch?v=5DU1B_XkyIk 5DU1B_XkyIk Watch the video above and post your comments. (3 Replies)
Discussion started by: Neo
3 Replies
Class::Adapter::Clear(3pm)				User Contributed Perl Documentation				Class::Adapter::Clear(3pm)

NAME
Class::Adapter::Clear - A handy base Adapter class that makes no changes SYNOPSIS
Hello World with CGI.pm the normal way # Load and create the CGI use CGI; $q = new CGI; # Create the page print $q->header, # HTTP Header $q->start_html('hello world'), # Start the page $q->h1('hello world'), # Hello World! $q->end_html; # End the page Hello World with CGI.pm the Adapter'ed way # Load and create the CGI use CGI; $q = new CGI; # Convert to an Adapter use Class::Adapter::Clear; $q = new Class::Adapter::Clear( $q ); # Create the page print $q->header, # HTTP Header $q->start_html('hello world'), # Start the page $q->h1('hello world'), # Hello World! $q->end_html; # End the page Creating a CGI Adapter class using Class::Adapter::Clear package My::CGI; use base 'Class::Adapter::Clear'; # Optional - Create the thing we are decorating auto-magically sub new { my $class = shift; # Create the object we are decorating my $query = CGI->new(@_); # Wrap it in the Adapter $class->SUPER::new($query); } # Decorate the h1 method to change what is created sub h1 { my $self = shift; my $str = shift; # Do something before the real method call if ( defined $str and $str eq 'hello world' ) { $str = 'Hello World!'; } $self->_OBJECT_->($str, @_); } DESCRIPTION
"Class::Adapter::Clear" provides the base class for creating one common type of Class::Adapter classes. For more power, move up to Class::Adapter::Builder. On it's own "Class::Adapter::Clear" passes all methods through to the same method in the parent object with the same parameters, responds to "->isa" like the parent object, and responds to "->can" like the parent object. It looks like a "Duck", and it quacks like a "Duck". On this base, you simple implement whatever method you want to do something special to. # Different method, same parameters sub method1 { my $self = shift; $self->_OBJECT_->method2(@_); # Call a different method } # Same method, different parameters sub method1 { my $self = shift; $self->_OBJECT_->method1( lc($_[0]) ); # Lowercase the param } # Same method, same parameters, tweak the result sub method1 { my $self = shift; my $rv = $self->_OBJECT_->method1(@_); $rv =~ s/ /<br> /g; # Add line-break HTML tags at each newline return $rv; } As you can see, the advantage of this full-scale Adapter approach, compared to inheritance, or function wrapping (see Class::Hook), is that you have complete and utter freedom to do anything you might need to do, without stressing the Perl inheritance model or doing anything unusual or tricky with "CODE" references. You may never need this much power. But when you need it, you really need it. As an aside, Class::Adapter::Clear is implemented with the following Class::Adapter::Builder formula. use Class::Adapter::Builder ISA => '_OBJECT_', AUTOLOAD => 1; METHODS
new $object As does the base Class::Adapter class, the default "new" constructor takes a single object as argument and creates a new object which holds the passed object. Returns a new "Class::Adapter::Clear" object, or "undef" if you do not pass in an object. SUPPORT
Bugs should be reported via the CPAN bug tracker at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Class-Adapter> For other issues, contact the author. AUTHOR
Adam Kennedy <adamk@cpan.org> SEE ALSO
Class::Adapter, Class::Adapter::Builder COPYRIGHT
Copyright 2005 - 2010 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.10.1 2010-04-11 Class::Adapter::Clear(3pm)
All times are GMT -4. The time now is 10:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy