Inputs.pm

wiley_dist/src/convert/perl/MudConvert/Inputs.pm · 937 B

From the archive WileyMUD3_091205.tar.bz2

Download the archive   « Back to the archive contents

#!/usr/bin/perl -w

package MudConvert::Inputs;

use strict;
use English;
use base 'Exporter';
use MudConvert::WileyMUD::Input;
use MudConvert::DUMP::Input;

our @EXPORT_OK = qw( %input_format validate_input );

our %input_format = (
                      'DUMP' => {
                                  'Name'	=> 'DUMP',
                                  'Type'	=> 'Data Dump',
                                  'CodeRef'	=> \&MudConvert::DUMP::Input::load_game,
                                },
                      'WileyMUD' => {
                                  'Name'	=> 'WileyMUD',
                                  'Type'	=> 'DikuMUD',
                                  'CodeRef'	=> \&MudConvert::WileyMUD::Input::load_game,
                                },
                    );

sub validate_input {
  my $choice = shift;

  return undef if !(defined $choice);
  return grep { $_ eq $choice } (keys %input_format);
}

1;

Site Stats

Snippets: 1791
Codebases: 571