Sponsored Content
Top Forums Shell Programming and Scripting YASSI - Yet Another Simple Script Installer (2020 edition) Post 303043226 by Neo on Tuesday 21st of January 2020 10:02:21 PM
Old 01-21-2020
Good to see your GitHub project and description here.

Thanks for posting.
This User Gave Thanks to Neo For This Post:
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Installer script -- function not found error

I am writing an installation script on AIX. This involves typical checks of some pre requisites like java, oracle, some version checks, disk space etc. It is a long script. I am facing a strange problem. There are a no of functions used in the script. What I see is that the installer complains of... (1 Reply)
Discussion started by: asutoshch
1 Replies

2. UNIX for Dummies Questions & Answers

Installer script needs to determine own location...

My n00b question: I am trying to write a script that I can place on a flash drive and then move from computer to computer and install a file, which is bundled with the script. (ie the script is at /Volumes/FlashDrive/Folder/Script, the file is at /Volumes/FlashDrive/Folder/File) So far I have... (1 Reply)
Discussion started by: madmacs
1 Replies

3. Shell Programming and Scripting

Help making simple perl or bash script to create a simple matrix

Hello all! This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician. Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix: ... (16 Replies)
Discussion started by: torchij
16 Replies

4. Shell Programming and Scripting

Xfce installer script

Xfce desktop installer script on Ubuntu for home, office or server computers. This script installs Xfce desktop and a set of programs according to user needs starting from an Ubuntu Server base system. It's valid for netbooks, notebooks, desktop computers and servers. For more information... (1 Reply)
Discussion started by: cesar-rgon
1 Replies

5. Shell Programming and Scripting

Yet another simple script installer

Heyas Just recently i tried to apply the GNU Autotools to my project, while it was possible, it took forever to know where to create which files and what to place in each of them. Dare you making a space rather than a tab! Inspired by GNU Autotools, and overhelmed by its functionality and... (0 Replies)
Discussion started by: sea
0 Replies

6. UNIX for Advanced & Expert Users

Simple (un-)installation of scripts using YASSI

Heyas Recently i've been 'fighting' with the GNU Autotools (autoconf, automake) to distribute one of my script based projects. Figured that these tools are very powerfull, and therefor can be very hard to learn/master. This said, a new personal project was started, inspired by the GNU... (0 Replies)
Discussion started by: sea
0 Replies

7. Shell Programming and Scripting

Installer is shell script not working

Hi Guys, I have one installer shell script which normally get from the dev team to install the app and it works fine for years (in IAX) the same installer/script iam trying to run in Linux 7.2 but it stuck somewhere which I cannot debug, can you help me to point out where it stuck . here is the... (9 Replies)
Discussion started by: Riverstone
9 Replies

8. What is on Your Mind?

Happy New Year 2020 to all :)

Hello All, I would like to wish A very Happy New Year 2020 to all. May GOD bless all of us with TRUE knowledge, wisdom, great attitude, honesty, hard working capability, great health :b: Cheers and let us all have fun/learning/sharing/caring on this GREAT forum UNIX.com, love you UNIX.com... (1 Reply)
Discussion started by: RavinderSingh13
1 Replies
Method::Signatures::Simple(3pm) 			User Contributed Perl Documentation			   Method::Signatures::Simple(3pm)

NAME
Method::Signatures::Simple - Basic method declarations with signatures, without source filters VERSION
version 1.02 SYNOPSIS
# -- a basic class -- # package User; use Method::Signatures::Simple; method new ($class: $name, $email) { my $user = { id => new_id(42), name => $name, email => $email, }; bless $user, $class; } func new_id ($seed) { state $id = $seed; $id++; } method name { $self->{name}; } method email { $self->{email}; } 1; # -- other features -- # # attributes method foo : lvalue { $self->{foo} } # change invocant name use Method::Signatures::Simple invocant => '$this'; method foo ($bar) { $this->bar($bar) } method bar ($class: $bar) { $class->baz($bar) } # use a different function keyword use Method::Signatures::Simple function_keyword => 'fun'; fun triple ($num) { 3 * $num } # use a different method keyword use Method::Signatures::Simple method_keyword => 'action'; action foo { $self->bar } RATIONALE
This module provides basic "method" and "func" keywords with simple signatures. It's intentionally simple, and is supposed to be a stepping stone for its bigger brothers MooseX::Method::Signatures and Method::Signatures. It only has a small benefit over regular subs, so if you want more features, look at those modules. But if you're looking for a small amount of syntactic sugar, this might just be enough. FEATURES
o invocant The "method" keyword automatically injects the annoying "my $self = shift;" for you. You can rename the invocant with the first argument, followed by a colon: method ($this:) {} method ($this: $that) {} The "func" keyword doesn't inject an invocant, but does do the signature processing below: func ($that) {} o signature The signature "($sig)" is transformed into "my ($sig) = @_;". That way, we mimic perl's usual argument handling. method foo ($bar, $baz, %opts) { func xyzzy ($plugh, @zorkmid) { # becomes sub foo { my $self = shift; my ($bar, $baz, %opts) = @_; sub xyzzy { my ($plugh, @zorkmid) = @_; ADVANCED CONFIGURATION
Since this module subclasses Devel::Declare::MethodInstaller::Simple, you can change the keywords and the default invocant with import arguments. These changes affect the current scope. o change the invocant name use Method::Signatures::Simple invocant => '$this'; method x { $this->{x} } method y { $this->{y} } # and this of course still works: method z ($self:) { $self->{z} } o change the keywords You can install a different keyword (instead of the default 'method' and 'func'), by passing names to the "use" line: use Method::Signatures::Simple method_keyword => 'action', function_keyword => 'thing'; action foo ($some, $args) { ... } thing bar ($whatever) { ... } One benefit of this is that you can use this module together with e.g. MooseX::Declare: # untested use MooseX::Declare; class Foo { use Method::Signatures::Simple method_keyword => 'routine'; method x (Int $x) { ... } # from MooseX::Method::Signatures routine y ($y) { ... } # from this module } If you specify neither "method_keyword" nor "function_keyword", then we default to injecting "method" and "func". If you only specify one of these options, then we only inject that one keyword into your scope. Examples: # injects 'method' and 'func' use Method::Signatures::Simple; # only injects 'action' use Method::Signatures::Simple method_keyword => 'action'; # only injects 'procedure' use Method::Signatures::Simple function_keyword => 'procedure'; # injects 'action' and 'function' use Method::Signatures::Simple method_keyword => 'action', function_keyword => 'function'; o install several keywords You're not limited to a single "use" line, so you can install several keywords with the same semantics as 'method' into the current scope: use Method::Signatures::Simple; # provides 'method' and 'func' use Method::Signatures::Simple method_keyword => 'action'; method x { ... } func y { ... } action z { ... } AUTHOR
Rhesa Rozendaal, "<rhesa at cpan.org>" BUGS
Please report any bugs or feature requests to "bug-method-signatures-simple at rt.cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Method-Signatures-Simple <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Method-Signatures- Simple>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc Method::Signatures::Simple You can also look for information at: o RT: CPAN's request tracker http://rt.cpan.org/NoAuth/Bugs.html?Dist=Method-Signatures-Simple <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Method-Signatures-Simple> o AnnoCPAN: Annotated CPAN documentation http://annocpan.org/dist/Method-Signatures-Simple <http://annocpan.org/dist/Method-Signatures-Simple> o CPAN Ratings http://cpanratings.perl.org/d/Method-Signatures-Simple <http://cpanratings.perl.org/d/Method-Signatures-Simple> o Search CPAN http://search.cpan.org/dist/Method-Signatures-Simple <http://search.cpan.org/dist/Method-Signatures-Simple> ACKNOWLEDGEMENTS
o MSTROUT For writing Devel::Declare and providing the core concepts. o MSCHWERN For writing Method::Signatures and publishing about it. This is what got my attention. o FLORA For helping me abstracting the Devel::Declare bits and suggesting improvements. o CHIPS For suggesting we add a 'func' keyword. SEE ALSO
Devel::Declare, Method::Signatures, MooseX::Method::Signatures. COPYRIGHT &; LICENSE Copyright 2011 Rhesa Rozendaal, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2011-09-01 Method::Signatures::Simple(3pm)
All times are GMT -4. The time now is 09:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy