Unix and Linux Discussions Tagged with data |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
4 |
13,963 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
11,713 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
20,499 |
Answers to Frequently Asked Questions |
|
|
|
7 |
13,118 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
9,553 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
7,625 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
5,394 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
4,270 |
UNIX for Beginners Questions & Answers |
|
|
|
0 |
37,911 |
Cybersecurity |
|
|
|
0 |
3,697 |
UNIX for Beginners Questions & Answers |
|
|
|
15 |
17,434 |
Shell Programming and Scripting |
|
|
|
6 |
8,834 |
Shell Programming and Scripting |
|
|
|
4 |
7,489 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
9,090 |
What is on Your Mind? |
|
|
|
4 |
11,802 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
5,006 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
5,974 |
Shell Programming and Scripting |
|
|
|
3 |
3,676 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
4,123 |
UNIX for Beginners Questions & Answers |
|
|
|
9 |
4,594 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
2,902 |
Shell Programming and Scripting |
|
|
|
2 |
10,212 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
4,944 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
2,060 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
2,946 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
3,221 |
Shell Programming and Scripting |
|
|
|
1 |
26,943 |
What is on Your Mind? |
|
|
|
1 |
5,465 |
AIX |
|
|
|
5 |
4,472 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
3,860 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
2,322 |
UNIX for Beginners Questions & Answers |
|
|
|
7 |
4,016 |
Shell Programming and Scripting |
|
|
|
0 |
5,279 |
What is on Your Mind? |
|
|
|
3 |
4,272 |
Programming |
|
|
|
9 |
5,577 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
1,792 |
Shell Programming and Scripting |
|
|
|
9 |
4,421 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
2,900 |
Shell Programming and Scripting |
|
|
|
4 |
1,961 |
Shell Programming and Scripting |
|
|
|
21 |
10,865 |
Shell Programming and Scripting |
URI::data(3) User Contributed Perl Documentation URI::data(3)
NAME
URI::data - URI that contains immediate data
SYNOPSIS
use URI;
$u = URI->new("data:");
$u->media_type("image/gif");
$u->data(scalar(`cat camel.gif`));
print "$u
";
open(XV, "|xv -") and print XV $u->data;
DESCRIPTION
The "URI::data" class supports "URI" objects belonging to the data URI scheme. The data URI scheme is specified in RFC 2397. It allows
inclusion of small data items as "immediate" data, as if it had been included externally. Examples:
data:,Perl%20is%20good
data:image/gif;base64,R0lGODdhIAAgAIAAAAAAAPj8+CwAAAAAI
AAgAAAClYyPqcu9AJyCjtIKc5w5xP14xgeO2tlY3nWcajmZZdeJcG
Kxrmimms1KMTa1Wg8UROx4MNUq1HrycMjHT9b6xKxaFLM6VRKzI+p
KS9XtXpcbdun6uWVxJXA8pNPkdkkxhxc21LZHFOgD2KMoQXa2KMWI
JtnE2KizVUkYJVZZ1nczBxXlFopZBtoJ2diXGdNUymmJdFMAADs=
"URI" objects belonging to the data scheme support the common methods (described in URI) and the following two scheme-specific methods:
$uri->media_type( [$new_media_type] )
Can be used to get or set the media type specified in the URI. If no media type is specified, then the default
"text/plain;charset=US-ASCII" is returned.
$uri->data( [$new_data] )
Can be used to get or set the data contained in the URI. The data is passed unescaped (in binary form). The decision about whether to
base64 encode the data in the URI is taken automatically, based on the encoding that produces the shorter URI string.
SEE ALSO
URI
COPYRIGHT
Copyright 1995-1998 Gisle Aas.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.12.1 2008-04-04 URI::data(3)