From 3aba144a3b8c4bbb9ea8e3d1539774f363b8dee4 Mon Sep 17 00:00:00 2001 From: Stefan Suhren Date: Thu, 17 Dec 2015 17:47:28 +0100 Subject: Add test for module setup --- Aufgabe6/RPN/lib/RPN.pm | 17 +++++++++-------- Aufgabe6/test-rpn.pl | 27 +++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 Aufgabe6/test-rpn.pl diff --git a/Aufgabe6/RPN/lib/RPN.pm b/Aufgabe6/RPN/lib/RPN.pm index bcf1b38..92f6f50 100644 --- a/Aufgabe6/RPN/lib/RPN.pm +++ b/Aufgabe6/RPN/lib/RPN.pm @@ -1,6 +1,5 @@ package RPN; -use 5.022000; use strict; use warnings; @@ -15,21 +14,23 @@ our @ISA = qw(Exporter); # This allows declaration use RPN ':all'; # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK # will save memory. -our %EXPORT_TAGS = ( 'all' => [ qw( - -) ] ); +our %EXPORT_TAGS = ( 'all' => [ qw( rpn ) ] ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); -our @EXPORT = qw( - -); +our @EXPORT = qw( ); -our $VERSION = '0.01'; +our $VERSION = '1.0'; # Preloaded methods go here. +sub rpn { + my ( $par1 ) = @_; + print "Modul RPN Funktion 'rpn'\n"; + return $par1; +} + 1; __END__ # Below is stub documentation for your module. You'd better edit it! diff --git a/Aufgabe6/test-rpn.pl b/Aufgabe6/test-rpn.pl new file mode 100644 index 0000000..b2ebef2 --- /dev/null +++ b/Aufgabe6/test-rpn.pl @@ -0,0 +1,27 @@ +#!/usr/bin/env perl +#=============================================================================== +# +# FILE: test-rpn.pl +# +# USAGE: ./test-rpn.pl +# +# DESCRIPTION: +# +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: Stefan Suhren (su), suhren.stefan@fh-swf.de +# ORGANIZATION: FH Südwestfalen, Iserlohn +# VERSION: 1.0 +# CREATED: 17.12.2015 17:39:06 +# REVISION: --- +#=============================================================================== + +use strict; +use warnings; +use utf8; + +use RPN; #Funktionen importieren + +RPN::rpn(); #Funktionsaufruf -- cgit v1.2.3-70-g09d2