OnSearch::Base64 - Base64 encoding and decoding library.


onsearch documentation Contained in the onsearch distribution.

Index


Code Index:

NAME

Top

OnSearch::Base64 - Base64 encoding and decoding library.

SYNOPSIS

Top

  use OnSearch::Base64;
  my $base64_str = encode_base64 ($str);
  my $str = decode_base64 ($str);

DESCRIPTION

Top

OnSearch::Base64 provides Base64 encoding and decoding functions.

EXPORT

Top

encode_base64 (str)

Encode a string using Base 64 encoding. ======= OnSearch::Base64 provides Base64 encoding and decoding functions.

EXPORT

Top

encode_base64 (str)

Encode a string using Base 64 encoding.

decode_base64 (base64_str)

Decode a Base 64 string.

VERSION AND COPYRIGHT

Top

VERSION AND COPYRIGHT

Top

SEE ALSO

Top

OnSearch(3)


onsearch documentation Contained in the onsearch distribution.

package OnSearch::Base64;

use 5.006;
use strict;
use warnings;
use Errno;
use Carp;

require Exporter;
require DynaLoader;
use AutoLoader;

our @ISA = qw(Exporter DynaLoader);

# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.

our @EXPORT_OK = qw(&encode_base64 &decode_base64);

our @EXPORT = qw();
our $VERSION = '0.01';

sub AUTOLOAD {
    # This AUTOLOAD is used to 'autoload' constants from the constant()
    # XS function.  If a constant is not found then control is passed
    # to the AUTOLOAD in AutoLoader.

    my $constname;
    our $AUTOLOAD;
    ($constname = $AUTOLOAD) =~ s/.*:://;
    croak "& not defined" if $constname eq 'constant';
    my $val = constant($constname, @_ ? $_[0] : 0);
    if ($! != 0) {
	if ($!{EINVAL}) {
	    $AutoLoader::AUTOLOAD = $AUTOLOAD;
	    goto &AutoLoader::AUTOLOAD;
	}
	else {
	    croak "Your vendor has not defined OnSearch::Base64 macro $constname";
	}
    }
    {
	no strict 'refs';
	# Fixed between 5.005_53 and 5.005_61
	if ($] >= 5.00561) {
	    *$AUTOLOAD = sub () { $val };
	}
	else {
	    *$AUTOLOAD = sub { $val };
	}
    }
    goto &$AUTOLOAD;
}

bootstrap OnSearch::Base64 $VERSION;

# Preloaded methods go here.

# Autoload methods go after =cut, and are processed by the autosplit program.

1;
__END__
# Below is stub documentation for your module. You better edit it!