Mac::iTunes::Preferences - interact with the iTunes Preferences


Mac-iTunes documentation Contained in the Mac-iTunes distribution.

Index


Code Index:

NAME

Top

Mac::iTunes::Preferences - interact with the iTunes Preferences

SYNOPSIS

Top

use Mac::iTunes;

$prefs = Mac::iTunes->preferences;

DESCRIPTION

Top

parse_file( FILENAME )
parse( STRING )

SOURCE AVAILABILITY

Top

This source is part of a SourceForge project which always has the latest sources in CVS, as well as all of the previous releases.

	http://sourceforge.net/projects/brian-d-foy/

If, for some reason, I disappear from the world, one of the other members of the project can shepherd this module appropriately.

TO DO

Top

* make it not read-only

AUTHOR

Top

brian d foy, <bdfoy@cpan.org>

COPYRIGHT AND LICENSE

Top


Mac-iTunes documentation Contained in the Mac-iTunes distribution.
# $Id: Preferences.pm 2634 2008-08-06 12:58:30Z comdog $
package Mac::iTunes::Preferences;
use strict;
use warnings;

use vars qw($VERSION);

$VERSION = 1.09;
#sprintf "%d.%02d", q$Revision: 2634 $ =~ m/ (\d+) \. (\d+) /gx;

use Mac::PropertyList;

sub _default_prefs
	{
	return;
	}

sub parse_file
	{
	my $class = shift;
	my $filename = shift || _default_prefs;

	open my($fh), $filename or return;
	my $string = do { local $/; <$fh> };
	close $fh;

	$class->parse( $string );
	}

sub parse
	{
	my $class  = shift;
	my $string = shift;

	my $plist = Mac::PropertyList::parse_plist( $string );

	bless $plist, $class;
	}

"See why 1984 won't be like 1984";