Sponsored Content
The Lounge What is on Your Mind? Under Consideration: Migrate the Forums to Discourse Post 303045013 by Neo on Tuesday 10th of March 2020 11:53:22 PM
Old 03-11-2020
Quote:
Originally Posted by sea
wooohoooo Smilie Smilie

Good luck, seems promising so far, cant wait! Smilie
Discourse is a work-of-art, so I am also excited to see this and it is looking very promising this will actually work out.

Finally after all these years, a better forum!
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to migrate ?

Currently, I am planning a migration between machine which under True64UNIX. The new machine will run with higher version O/S. My question is, is there any solution on migrating one machine to another which with different O/S version? My goal is keeping minimum impact to the users. Excuse my... (1 Reply)
Discussion started by: coolmans
1 Replies

2. UNIX for Dummies Questions & Answers

Pipe not taken into consideration

I'm trying to see every file which my group (staff) has in a certain directory, recursively. The pipe ls -l -R | grep staff is not working exactly as I want, as for every directory to which my user does not have access, a line like: ls: ./directory/lost+found: The file access permissions do not... (5 Replies)
Discussion started by: panchopp
5 Replies

3. Solaris

Migrate oracle solaris 5.8 5.9

If I have an oracle 9 database environment on a san running solaris 5.8 as the os. Can I plug the san into a Solaris 5.9 environment and have the database work ? - as long as binaries are on the san (1 Reply)
Discussion started by: tim-carroll@com
1 Replies

4. Solaris

Can you migrate UFS to ZFS ?

I have some UFS volumes (non root), that I would like to change into ZFS volumes. Is this possible ? I think the only method is to create a new zfs volume and copy the data accoss, this would take a long time for us. Is there a quicker way ? Regards (5 Replies)
Discussion started by: wjones
5 Replies

5. Solaris

Migrate from MPXIO to Powerpath

Here is the issue: I am building a database server using Solaris 10x86 U8. The system is jumpstarted with mpxio enabled and booting from the san. We need to have powerpath 5.3 installed and would like to have powerpath take control of the the boot san as well or have mpxio control the san... (2 Replies)
Discussion started by: nabru72
2 Replies

6. Linux

Mysql Migrate

Hi , I would like to (MYSQL) migrate the all the data from solari's to linux box. I have checked whether mysql is installed or not. rpm -qa | grep -i mysql I confirmed !!!! I want to know the following points. 1) How can get to know what are mysql data files and location as well.... (4 Replies)
Discussion started by: Mani_apr08
4 Replies

7. BSD

Migrate a Hard Disk

hi Has anyone already tried to migrate a hard disk with FreeBSD using recoverdisk? (1 Reply)
Discussion started by: ccc
1 Replies

8. Shell Programming and Scripting

Migrate from FTP to SFTP

Hi,I am using following code for FTP in shell script file and it is working.Now I want to migrate from FTP to SFTP.What code changes/steps I have to perform for SFTP ? ftp -in <<FIN open $SAP_UP_SERVER user $SAP_UP_USER $SAP_UP_PASSWORD asc put... (7 Replies)
Discussion started by: Nitin Varshneya
7 Replies
MooseX::Method::Signatures(3pm) 			User Contributed Perl Documentation			   MooseX::Method::Signatures(3pm)

NAME
MooseX::Method::Signatures - Method declarations with type constraints and no source filter SYNOPSIS
package Foo; use Moose; use MooseX::Method::Signatures; method morning (Str $name) { $self->say("Good morning ${name}!"); } method hello (Str :$who, Int :$age where { $_ > 0 }) { $self->say("Hello ${who}, I am ${age} years old!"); } method greet (Str $name, Bool :$excited = 0) { if ($excited) { $self->say("GREETINGS ${name}!"); } else { $self->say("Hi ${name}!"); } } $foo->morning('Resi'); # This works. $foo->hello(who => 'world', age => 42); # This too. $foo->greet('Resi', excited => 1); # And this as well. $foo->hello(who => 'world', age => 'fortytwo'); # This doesn't. $foo->hello(who => 'world', age => -23); # This neither. $foo->morning; # Won't work. $foo->greet; # Will fail. DESCRIPTION
Provides a proper method keyword, like "sub" but specifically for making methods and validating their arguments against Moose type constraints. SIGNATURE SYNTAX
The signature syntax is heavily based on Perl 6. However not the full Perl 6 signature syntax is supported yet and some of it never will be. Type Constraints method foo ( $affe) # no type checking method bar (Animal $affe) # $affe->isa('Animal') method baz (Animal|Human $affe) # $affe->isa('Animal') || $affe->isa('Human') Positional vs. Named method foo ( $a, $b, $c) # positional method bar (:$a, :$b, :$c) # named method baz ( $a, $b, :$c) # combined Required vs. Optional method foo ($a , $b!, :$c!, :$d!) # required method bar ($a?, $b?, :$c , :$d?) # optional Defaults method foo ($a = 42) # defaults to 42 Constraints method foo ($foo where { $_ % 2 == 0 }) # only even Invocant method foo ( $moo) # invocant is called $self and is required method bar ($self: $moo) # same, but explicit method baz ($class: $moo) # invocant is called $class Labels method foo (: $affe ) # called as $obj->foo(affe => $value) method bar (:apan($affe)) # called as $obj->foo(apan => $value) Traits method foo (Affe $bar does trait) method foo (Affe $bar is trait) The only currently supported trait is "coerce", which will attempt to coerce the value provided if it doesn't satisfy the requirements of the type constraint. Placeholders method foo ($bar, $, $baz) Sometimes you don't care about some params you're being called with. Just put the bare sigil instead of a full variable name into the signature to avoid an extra lexical variable to be created. Complex Example method foo ( SomeClass $thing where { $_->can('stuff') }: Str $bar = "apan", Int :$baz! = 42 where { $_ % 2 == 0 } where { $_ > 10 } ) # the invocant is called $thing, must be an instance of SomeClass and has to implement a 'stuff' method # $bar is positional, required, must be a string and defaults to "apan" # $baz is named, required, must be an integer, defaults to 42 and needs # to be even and greater than 10 BUGS, CAVEATS AND NOTES This module is as stable now, but this is not to say that it is entirely bug free. If you notice any odd behaviour (messages not being as good as they could for example) then please raise a bug. Fancy signatures Parse::Method::Signatures is used to parse the signatures. However, some signatures that can be parsed by it aren't supported by this module (yet). No source filter While this module does rely on the hairy black magic of Devel::Declare it does not depend on a source filter. As such, it doesn't try to parse and rewrite your source code and there should be no weird side effects. Devel::Declare only effects compilation. After that, it's a normal subroutine. As such, for all that hairy magic, this module is surprisingly stable. What about regular subroutines? Devel::Declare cannot yet change the way "sub" behaves. However, the signatures module can. Right now it only provides very basic signatures, but it's extendable enough that plugging MooseX::Method::Signatures signatures into that should be quite possible. What about the return value? Type constraints for return values can be declared using method foo (Int $x, Str $y) returns (Bool) { ... } however, this feature only works with scalar return values and is still considered to be experimental. Interaction with Moose::Role Methods not seen by a role's "requires" Because the processing of the MooseX::Method::Signatures "method" and the Moose "with" keywords are both done at runtime, it can happen that a role will require a method before it is declared (which will cause Moose to complain very loudly and abort the program). For example, the following will not work: # in file Canine.pm package Canine; use Moose; use MooseX::Method::Signatures; with 'Watchdog'; method bark { print "Woof! "; } 1; # in file Watchdog.pm package Watchdog; use Moose::Role; requires 'bark'; # will assert! evaluated before 'method' is processed sub warn_intruder { my $self = shift; my $intruder = shift; $self->bark until $intruder->gone; } 1; A workaround for this problem is to use "with" only after the methods have been defined. To take our previous example, Canine could be reworked thus: package Canine; use Moose; use MooseX::Method::Signatures; method bark { print "Woof! "; } with 'Watchdog'; 1; A better solution is to use MooseX::Declare instead of plain MooseX::Method::Signatures. It defers application of roles until the end of the class definition. With it, our example would becomes: # in file Canine.pm use MooseX::Declare; class Canine with Watchdog { method bark { print "Woof! "; } } 1; # in file Watchdog.pm use MooseX::Declare; role Watchdog { requires 'bark'; method warn_intruder ( $intruder ) { $self->bark until $intruder->gone; } } 1; Subroutine redefined warnings When composing a Moose::Role into a class that uses MooseX::Method::Signatures, you may get a "Subroutine redefined" warning. This happens when both the role and the class define a method/subroutine of the same name. (The way roles work, the one defined in the class takes precedence.) To eliminate this warning, make sure that your "with" declaration happens after any method/subroutine declarations that may have the same name as a method/subroutine within a role. SEE ALSO
MooseX::Declare Method::Signatures::Simple Method::Signatures Perl6::Subs Devel::Declare Parse::Method::Signatures Moose AUTHORS
o Florian Ragwitz <rafl@debian.org> o Ash Berlin <ash@cpan.org> o Cory Watson <gphat@cpan.org> o Daniel Ruoso <daniel@ruoso.com> o Dave Rolsky <autarch@urth.org> o Hakim Cassimally <hakim.cassimally@gmail.com> o Jonathan Scott Duff <duff@pobox.com> o Justin Hunter <justin.d.hunter@gmail.com> o Kent Fredric <kentfredric@gmail.com> o Maik Hentsche <maik.hentsche@amd.com> o Matt Kraai <kraai@ftbfs.org> o Rhesa Rozendaal <rhesa@cpan.org> o Ricardo SIGNES <rjbs@cpan.org> o Steffen Schwigon <ss5@renormalist.net> o Yanick Champoux <yanick@babyl.dyndns.org> o Nicholas Perez <nperez@cpan.org> o Karen Etheridge <ether@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Florian Ragwitz. 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.14.2 2012-05-21 MooseX::Method::Signatures(3pm)
All times are GMT -4. The time now is 03:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy