IO-TieCombine
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/IO/TieCombine.pm view on Meta::CPAN
596061626364656667686970717273747576777879#pod =cut
sub
new {
my
(
$class
) =
@_
;
my
$self
= {
combined
=> \(
my
$str
=
''
),
slots
=> { },
};
bless
$self
=>
$class
;
}
#pod =method combined_contents
#pod
#pod This method returns the contents of all collected data.
#pod
#pod =cut
sub
combined_contents {
my
(
$self
) =
@_
;
lib/IO/TieCombine/Handle.pm view on Meta::CPAN
789101112131415161718192021222324252627sub
TIEHANDLE {
my
(
$class
,
$arg
) =
@_
;
my
$self
= {
slot_name
=>
$arg
->{slot_name},
combined_ref
=>
$arg
->{combined_ref},
output_ref
=>
$arg
->{output_ref},
};
return
bless
$self
=>
$class
;
}
sub
PRINT {
my
(
$self
,
@output
) =
@_
;
my
$joined
=
join
((
defined
$, ? $, :
q{}
),
@output
)
. (
defined
$\ ? $\ :
q{}
);
${
$self
->{output_ref} } .=
$joined
;
${
$self
->{combined_ref} } .=
$joined
;
lib/IO/TieCombine/Scalar.pm view on Meta::CPAN
view all matches for this distribution
789101112131415161718192021222324252627sub
TIESCALAR {
my
(
$class
,
$arg
) =
@_
;
my
$self
= {
slot_name
=>
$arg
->{slot_name},
combined_ref
=>
$arg
->{combined_ref},
output_ref
=>
$arg
->{output_ref},
};
bless
$self
=>
$class
;
}
sub
FETCH {
return
${
$_
[0]->{output_ref} }
}
sub
STORE {
my
(
$self
,
$value
) =
@_
;
my
$class
=
ref
$self
;
my
$output_ref
=
$self
->{output_ref};
view release on metacpan - search on metacpan
( run in 0.943 second using v1.00-cache-2.02-grep-82fe00e-cpan-6a81d49e493 )