6 More Discussions You Might Find Interesting
1. Solaris
Hi Folks,
Just a quick question here, about Legacy Zones. Well more about how to determine if you are actually in one, on logging into a legacy zone - is there a quick way of checking that?
Regards
Gull04 (7 Replies)
Discussion started by: gull04
7 Replies
2. SCO
We have a legacy software application that runs on SCO OpenServer 5.0.6, and the current server (built around 2003-04) is still running. I have been attempting to upgrade the hardware, to hopefully increase the time that we will have access to the data in this system, but am running into an... (13 Replies)
Discussion started by: spock9458
13 Replies
3. Solaris
Hi All,
I have a problem as follows.
Historically, there was an Ultra10 workstation running Solaris 8 using automount to access NFS volumes on a Solaris 8 server.
The Ultra 10 was retired and the Solaris 8 server has been migrated to a Legacy Container (Solaris 8 Branded, whole root,... (9 Replies)
Discussion started by: hicksd8
9 Replies
4. What is on Your Mind?
Watched it. Major disappointment. (10 Replies)
Discussion started by: ni2
10 Replies
5. Solaris
I want to add auto startup and shutdown script to Solaris 10's legacy services as they run in Solaris 9 or in Linux.
To make this work, I created the crontrol script in /etc/init.d and then link it to /etc/rc0.d and /etc/rc2.d directories. rc0.d is for shutdown and rc2.d is for srat. After I... (15 Replies)
Discussion started by: duke0001
15 Replies
6. Programming
Is there anyone who still uses CMI to connect to the legacy system , my c applications do uses the binaries and libraries for using the CMI functionality but i do not have access to the original source code , and since this is a very old stuff , i just could not get any source to get to knwo the... (0 Replies)
Discussion started by: dino_leix
0 Replies
LEARN ABOUT OSX
moose::cookbook::legacy::debugging_baseclassreplacement
Moose::Cookbook::Legacy::Debugging_BaseClassReplacement(User Contributed Perl DocumentatMoose::Cookbook::Legacy::Debugging_BaseClassReplacement(3)
NAME
Moose::Cookbook::Legacy::Debugging_BaseClassReplacement - Providing an alternate base object class
VERSION
version 2.0604
SYNOPSIS
package MyApp::Base;
use Moose;
extends 'Moose::Object';
before 'new' => sub { warn "Making a new " . $_[0] };
no Moose;
package MyApp::UseMyBase;
use Moose ();
use Moose::Exporter;
Moose::Exporter->setup_import_methods( also => 'Moose' );
sub init_meta {
shift;
return Moose->init_meta( @_, base_class => 'MyApp::Base' );
}
DESCRIPTION
WARNING: Replacing the base class entirely, as opposed to applying roles to the base class, is strongly discouraged. This recipe is
provided solely for reference when encountering older code that does this.
A common extension is to provide an alternate base class. One way to do that is to make a "MyApp::Base" and add "extends 'MyApp::Base'" to
every class in your application. That's pretty tedious. Instead, you can create a Moose-alike module that sets the base object class to
"MyApp::Base" for you.
Then, instead of writing "use Moose" you can write "use MyApp::UseMyBase".
In this particular example, our base class issues some debugging output every time a new object is created, but you can think of some more
interesting things to do with your own base class.
This uses the magic of Moose::Exporter. When we call "Moose::Exporter->setup_import_methods( also => 'Moose' )" it builds "import" and
"unimport" methods for you. The "also => 'Moose'" bit says that we want to export everything that Moose does.
The "import" method that gets created will call our "init_meta" method, passing it "for_caller => $caller" as its arguments. The $caller is
set to the class that actually imported us in the first place.
See the Moose::Exporter docs for more details on its API.
NAME
Moose::Cookbook::Extending::Recipe3 - Providing an alternate base object class
VERSION
version 2.0402
USING MyApp::UseMyBase
To actually use our new base class, we simply use "MyApp::UseMyBase" instead of "Moose". We get all the Moose sugar plus our new base
class.
package Foo;
use MyApp::UseMyBase;
has 'size' => ( is => 'rw' );
no MyApp::UseMyBase;
CONCLUSION
This is an awful lot of magic for a simple base class. You will often want to combine a metaclass trait with a base class extension, and
that's when this technique is useful.
AUTHOR
Moose is maintained by the Moose Cabal, along with the help of many contributors. See "CABAL" in Moose and "CONTRIBUTORS" in Moose for
details.
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Infinity Interactive, Inc..
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
AUTHOR
Moose is maintained by the Moose Cabal, along with the help of many contributors. See "CABAL" in Moose and "CONTRIBUTORS" in Moose for
details.
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Infinity Interactive, Inc..
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.16.2 2012-09-19 Moose::Cookbook::Legacy::Debugging_BaseClassReplacement(3)