Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 52.14.124.154
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : String.pm
use strict; use warnings;
package IO::All::String;

use IO::All -base;

const type => 'string';

sub string_ref {
   my ($self, $ref) = @_;

   no strict 'refs';
   *$self->{ref} = $ref if exists $_[1];

   return *$self->{ref}
}

sub string {
    my $self = shift;
    bless $self, __PACKAGE__;
    $self->_init;
}

sub open {
    my $self = shift;
    my $str = '';
    my $ref = \$str;
    $self->string_ref($ref);
    open my $fh, '+<', $ref;
    $self->io_handle($fh);
    $self->_set_binmode;
    $self->is_open(1);
}

1;
© 2025 GrazzMean