summaryrefslogtreecommitdiffabout
path: root/modules/renrot_dir.pm
Side-by-side diff
Diffstat (limited to 'modules/renrot_dir.pm') (more/less context) (ignore whitespace changes)
-rwxr-xr-xmodules/renrot_dir.pm47
1 files changed, 47 insertions, 0 deletions
diff --git a/modules/renrot_dir.pm b/modules/renrot_dir.pm
new file mode 100755
index 0000000..701b9c4
--- a/dev/null
+++ b/modules/renrot_dir.pm
@@ -0,0 +1,47 @@
+use strict;
+
+package renrot_dir;
+
+###################################################
+# Usage : $a = new renrot_dir;
+# Purpose : allocator and initializer
+# Returns : initialized class
+# Parameters : none
+# Throws : no exceptions
+# Comments : none
+# See Also : n/a
+sub new {
+ my ($pkg, $dir, $ext) = @_;
+ my @files = ();
+ return (bless {dir => $dir,
+ ext => $ext,
+ files => \@files}, $pkg);
+}
+
+###################################################
+# Usage : none
+# Purpose : destructor
+# Returns : none
+# Parameters : none
+# Throws : no exceptions
+# Comments : none
+# See Also : n/a
+sub DESTROY {
+ my $obj = shift;
+ #print "\$obj->{", $obj->{dir}, "} has been destroied.\n";
+}
+
+###################################################
+# Usage : $obj->filename($base, $ext)
+# Purpose : full file name compilator: base . ext = baseext
+# Returns : ful filename
+# Parameters : 1. basename; 2. extention of ".ext" format
+# Throws : no exceptions
+# Comments : none
+# See Also : n/a
+sub file_name {
+ my ($obj, $base, $ext) = @_;
+ return $obj->{filename} = $base . $ext;
+}
+
+1;

Return to:

Send suggestions and report system problems to the System administrator.