view release on metacpan or search on metacpan
4delivery.com
4democracy.com
4democrats.com
4dentists.com
4denver.com
4desktoppublishing.com
4desktopthemes.com
4desmoines.com
4desserts.com
4detroit.com
4diabetes.com
4diet.com
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/tinylogin.ecd view on Meta::CPAN
TYPE=bool
DEFAULT_VALUE=1
PROMPT=Include user administration utilities?
<HELP>
These utilities are used for user administration. On a typical
desktop distribution, these commands (with the exception of
passwd) would be implemented as perl or shell scripts. These
have been written in C, because they could be implemented in a
more size efficient manner, and because in an embedded environment,
certain Unix commands that one takes for granted may not be
available.
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/tinylogin.ecd view on Meta::CPAN
TYPE=bool
DEFAULT_VALUE=1
PROMPT=Include user administration utilities?
<HELP>
These utilities are used for user administration. On a typical
desktop distribution, these commands (with the exception of
passwd) would be implemented as perl or shell scripts. These
have been written in C, because they could be implemented in a
more size efficient manner, and because in an embedded environment,
certain Unix commands that one takes for granted may not be
available.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Enbld/Definition/Pkgconfig.pm view on Meta::CPAN
$self->SUPER::initialize;
$self->{defined}{ArchiveName} = 'pkg-config';
$self->{defined}{WebSite} =
'http://www.freedesktop.org/wiki/Software/pkg-config/';
$self->{defined}{VersionForm} = '\d\.\d{1,2}(?:\.\d)?';
$self->{defined}{DownloadSite} =
'http://pkgconfig.freedesktop.org/releases/';
$self->{defined}{AdditionalArgument} = '--with-internal-glib';
return $self;
}
lib/Enbld/Definition/Pkgconfig.pm view on Meta::CPAN
Enbld::Definition::Pkgconfig - definition module for pkg-config
=head1 SEE ALSO
L<pkg-config|http://www.freedesktop.org/wiki/Software/pkg-config/>
L<Enbld::Definition>
=head1 COPYRIGHT
view all matches for this distribution
view release on metacpan or search on metacpan
etc/login/dot.dtprofile view on Meta::CPAN
#############################################################################
###
### Your $HOME/.dtprofile is read each time you login to the Common Desktop
### Environment (CDE) and is the place to set or override desktop
### environment variables for your session. Environment variables set in
### $HOME/.dtprofile are made available to all applications on the desktop.
### The desktop will accept either sh or ksh syntax for the commands in
### $HOME/.dtprofile.
###
#############################################################################
etc/login/dot.dtprofile view on Meta::CPAN
export dtstart_sessionlogfile="/dev/console"
#############################################################################
###
### By default, the desktop does not read your standard $HOME/.profile
### or $HOME/.login files. This can be changed by uncommenting the
### DTSOURCEPROFILE variable assignment at the end of this file. The
### desktop reads .profile if your $SHELL is "sh" or "ksh", or .login
### if your $SHELL is "csh".
###
### The desktop reads the .dtprofile and .profile/.login without an
### associated terminal emulator such as xterm or dtterm. This means
### there is no available command line for interaction with the user.
### This being the case, these scripts must avoid using commands that
### depend on having an associated terminal emulator or that interact
### with the user. Any messages printed in these scripts will not be
### seen when you log in and any prompts such as by the 'read' command
### will return an empty string to the script. Commands that set a
### terminal state, such as "tset" or "stty" should be avoided.
###
### With minor editing, it is possible to adapt your .profile or .login
### for use both with and without the desktop. Group the statements not
### appropriate for your desktop session into one section and enclose them
### with an "if" statement that checks for the setting of the "DT"
### environment variable. When the desktop reads your .profile or .login
### file, it will set "DT" to a non-empty value for which your .profile or
### .login can test.
###
### example for sh/ksh
###
### if [ ! "$DT" ]; then
### #
### # commands and environment variables not appropriate for desktop
### #
### stty ...
### tset ...
### DISPLAY=mydisplay:0
### ...
### fi
###
### #
### # environment variables common to both desktop and non-desktop
### #
### PATH=$HOME/bin:$PATH
### MYVAR=value
### export MYVAR
### ...
###
### example for csh
###
### if ( ! ${?DT} ) then
### #
### # commands and environment variables not appropriate for desktop
### #
### stty ...
### tset ...
### setenv DISPLAY mydisplay:0
### ...
### endif
###
### #
### # environment variables common to both desktop and non-desktop
### #
### setenv PATH $HOME/bin:$PATH
### setenv MYVAR value
### ...
###
view all matches for this distribution
view release on metacpan or search on metacpan
Merge pull request #1 from 2dorr/master
make the BDD tests pass
Change: a40fec2b22ae4c9c53cdddbb265349f814e8f0f6
Author: root <root@tudor-desktop.(none)>
Date : 2012-04-11 11:36:58 +0000
behaviors.t test fix
Change: fc8d7a385843d127dcd335c75275c96358692eee
view all matches for this distribution
view release on metacpan or search on metacpan
@prefix dc: <http://purl.org/dc/terms/> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix doap-changeset: <http://ontologi.es/doap-changeset#> .
@prefix doap-deps: <http://ontologi.es/doap-deps#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix nfo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://dev.perl.org/licenses/>
dc:title "the same terms as the perl 5 programming language system itself".
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ExtUtils/PkgConfig.pm view on Meta::CPAN
L<ExtUtils::Depends>
L<http://gtk2-perl.sourceforge.net/>
This module is really just an interface to the pkg-config utility program.
http://www.freedesktop.org/Software/pkgconfig
=head1 AUTHORS
muppet E<lt>scott at asofyet dot orgE<gt>.
view all matches for this distribution
view release on metacpan or search on metacpan
examples/win32_getSystemTime.pl view on Meta::CPAN
$ffiObj->lib($libPath);
#Import the GetLocalTime function
$ffiObj->attach('GetLocalTime',['record(16)'],'void');
#Define SYSTEMTIME Struct as per https://msdn.microsoft.com/en-us/library/windows/desktop/ms724950(v=vs.85).aspx
#As per, C:\MinGW\include\windef.h, WORD id unsigned short
my $c = Convert::Binary::C->new->parse(<<ENDC);
struct SYSTEMTIME {
unsigned short wYear;
view all matches for this distribution
view release on metacpan or search on metacpan
deps/libffi/generate-darwin-source-and-headers.py view on Meta::CPAN
suffix = "\n\n#endif"
src_dir = 'aarch64'
src_files = ['sysv.S', 'ffi.c']
class desktop32_platform(Platform):
directory = 'darwin_osx'
sdk = 'macosx'
arch = 'i386'
triple = 'i386-apple-darwin10'
version_min = '-mmacosx-version-min=10.6'
deps/libffi/generate-darwin-source-and-headers.py view on Meta::CPAN
prefix = "#ifdef __i386__\n\n"
suffix = "\n\n#endif"
class desktop64_platform(Platform):
directory = 'darwin_osx'
sdk = 'macosx'
arch = 'x86_64'
triple = 'x86_64-apple-darwin10'
version_min = '-mmacosx-version-min=10.6'
deps/libffi/generate-darwin-source-and-headers.py view on Meta::CPAN
copy_src_platform_files(simulator_platform)
copy_src_platform_files(simulator64_platform)
copy_src_platform_files(device_platform)
copy_src_platform_files(device64_platform)
if generate_osx:
copy_src_platform_files(desktop32_platform)
copy_src_platform_files(desktop64_platform)
platform_headers = collections.defaultdict(set)
if generate_ios:
build_target(simulator_platform, platform_headers)
build_target(simulator64_platform, platform_headers)
build_target(device_platform, platform_headers)
build_target(device64_platform, platform_headers)
if generate_osx:
build_target(desktop32_platform, platform_headers)
build_target(desktop64_platform, platform_headers)
mkdir_p('darwin_common/include')
for header_name, tag_tuples in platform_headers.iteritems():
basename, suffix = os.path.splitext(header_name)
with open(os.path.join('darwin_common/include', header_name), 'w') as header:
view all matches for this distribution
view release on metacpan or search on metacpan
deps/hidapi/m4/pkg.m4 view on Meta::CPAN
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
[$4])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
view all matches for this distribution
view release on metacpan or search on metacpan
lib/FWS/V2/Display.pm view on Meta::CPAN
}
}
}
#
# If your a mobile device, and your mobile is set to (2) show desktop only then eat the type
#
if ( $ENV{HTTP_USER_AGENT} =~ /mobile/i && $valueHash{showMobile} eq '2' ) {
$valueHash{type} = '';
}
view all matches for this distribution
view release on metacpan or search on metacpan
author.t/authenticate.t view on Meta::CPAN
use_ok('Facebook::Graph');
my $fb = Facebook::Graph->new(
secret => $ENV{FB_SECRET},
app_id => $ENV{FB_APP_ID},
postback => 'https://www.facebook.com/connect/login_success.html', # this is used for desktop apps, so we're cheating a bit for this test
);
isa_ok($fb, 'Facebook::Graph');
my $uri = $fb->authorize->extend_permissions(qw(read_stream manage_pages))->uri_as_string;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Facebook.pm view on Meta::CPAN
use Carp qw/croak/;
use namespace::autoclean;
has desktop => (
isa => 'Bool',
is => 'ro',
required => 1,
lazy => 1,
default => sub { 0 },
lib/Facebook.pm view on Meta::CPAN
my $rest_class_file = $self->rest_class;
$rest_class_file =~ s/::/\//g;
require $rest_class_file.'.pm';
$self->rest_class->import;
$self->rest_class->new(
desktop => $self->desktop ? 0 : 1,
api_key => $self->api_key,
secret => $self->secret,
);
},
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Fedora/App/ReviewTool/Command/review.pm view on Meta::CPAN
documentation is small, so no -docs subpackage is necessary.
%docs are not necessary for the proper functioning of the package.
no headers.
no pkgconfig files.
no libtool .la droppings.
desktop files valid and installed properly.
__[ review_pedantic ]__
Here is the review:
lib/Fedora/App/ReviewTool/Command/review.pm view on Meta::CPAN
[] MUST: Static libraries must be in a -static package.
[] MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' (for directory ownership and usability).
[] MUST: If a package contains library files with a suffix (e.g. libfoo.so.1.1), then library files that end in .so (without suffix) must go in a -devel package.
[] MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name} = %{version}-%{release}
[] MUST: Packages must NOT contain any .la libtool archives, these should be removed in the spec.
[] MUST: Packages containing GUI applications must include a %{name}.desktop file, and that file must be properly installed with desktop-file-install in the %install section.
[] MUST: Packages must not own files or directories already owned by other packages.
[] MUST: At the beginning of %install, each package MUST run rm -rf %{buildroot} (or $RPM_BUILD_ROOT).
[] MUST: All filenames in rpm packages must be valid UTF-8.
SHOULD Items:
view all matches for this distribution
view release on metacpan or search on metacpan
examples/yahoo-google.xml view on Meta::CPAN
<node ip="74.125.93.101" hostname="code.l.google.com"/>
<node ip="74.125.93.102" hostname="code.l.google.com"/>
<node ip="74.125.93.138" hostname="code.l.google.com"/>
<node ip="74.125.93.100" hostname="code.l.google.com"/>
<node ip="74.125.93.113" hostname="code.l.google.com"/>
<node ip="74.125.93.99" hostname="desktop.l.google.com"/>
<node ip="74.125.93.103" hostname="desktop.l.google.com"/>
<node ip="74.125.93.147" hostname="desktop.l.google.com"/>
<node ip="74.125.93.105" hostname="desktop.l.google.com"/>
<node ip="74.125.93.104" hostname="desktop.l.google.com"/>
<node ip="74.125.93.106" hostname="desktop.l.google.com"/>
<node ip="74.125.54.213" hostname="feedsftp.l.google.com"/>
<node ip="74.125.19.102" hostname="csi.l.google.com"/>
<node ip="74.125.19.138" hostname="csi.l.google.com"/>
<node ip="74.125.19.100" hostname="csi.l.google.com"/>
<node ip="74.125.19.113" hostname="csi.l.google.com"/>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/BaseDir.pm view on Meta::CPAN
use warnings;
use Exporter 5.57 qw( import );
use File::Spec;
use Config;
# ABSTRACT: Use the Freedesktop.org base directory specification
our $VERSION = '0.09'; # VERSION
our %EXPORT_TAGS = (
vars => [ qw(
xdg_data_home xdg_data_dirs
lib/File/BaseDir.pm view on Meta::CPAN
=encoding UTF-8
=head1 NAME
File::BaseDir - Use the Freedesktop.org base directory specification
=head1 VERSION
version 0.09
lib/File/BaseDir.pm view on Meta::CPAN
}
=head1 DESCRIPTION
This module can be used to find directories and files as specified
by the Freedesktop.org Base Directory Specification. This specifications
gives a mechanism to locate directories for configuration, application data
and cache data. It is suggested that desktop applications for e.g. the
GNOME, KDE or Xfce platforms follow this layout. However, the same layout can
just as well be used for non-GUI applications.
This module forked from L<File::MimeInfo>.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/ConfigDir.pm view on Meta::CPAN
=cut
$VERSION = '0.021';
@EXPORT_OK = (
qw(config_dirs system_cfg_dir desktop_cfg_dir),
qw(xdg_config_dirs machine_cfg_dir),
qw(core_cfg_dir site_cfg_dir vendor_cfg_dir),
qw(locallib_cfg_dir local_cfg_dir),
qw(here_cfg_dir singleapp_cfg_dir vendorapp_cfg_dir),
qw(xdg_config_home user_cfg_dir)
lib/File/ConfigDir.pm view on Meta::CPAN
$system_cfg_dir->(@cfg_base);
}
=head2 machine_cfg_dir
Alias for desktop_cfg_dir - deprecated.
=head2 xdg_config_dirs
Alias for desktop_cfg_dir
=head2 desktop_cfg_dir
Returns the configuration directory where configuration files of the
desktop applications resides. For Unices this is C</etc/xdg>, for MSWin32
it's the value of the environment variable C<%ALLUSERSPROFILE%>
concatenated with the basename of the environment variable C<%APPDATA%>.
=cut
my $desktop_cfg_dir = sub {
my @cfg_base = @_;
my @dirs;
if ($^O eq "MSWin32")
{
my $alluserprof = $ENV{ALLUSERSPROFILE};
lib/File/ConfigDir.pm view on Meta::CPAN
}
}
@dirs;
};
sub desktop_cfg_dir
{
my @cfg_base = @_;
1 < scalar(@cfg_base)
and croak "desktop_cfg_dir(;\$), not desktop_cfg_dir(" . join(",", ("\$") x scalar(@cfg_base)) . ")";
$desktop_cfg_dir->(@cfg_base);
}
no warnings 'once';
*machine_cfg_dir = \&desktop_cfg_dir;
*xdg_config_dirs = \&desktop_cfg_dir;
use warnings;
=head2 core_cfg_dir
Returns the C<etc> directory below C<$Config{prefix}>.
lib/File/ConfigDir.pm view on Meta::CPAN
$user_cfg_dir->(@cfg_base);
}
=head2 xdg_config_home
Returns the user configuration directory for desktop applications.
If C<< $ENV{XDG_CONFIG_HOME} >> is not set, for MSWin32 the value
of C<< $ENV{APPDATA} >> is return and on Unices the C<.config> directory
in the users home folder. Without L<File::HomeDir>, on Unices the returned
list might be empty.
lib/File/ConfigDir.pm view on Meta::CPAN
$xdg_config_home->(@cfg_base);
}
my (@extensible_bases, @pure_bases);
push(@extensible_bases,
$system_cfg_dir, $desktop_cfg_dir, $local_cfg_dir, $singleapp_cfg_dir, $vendorapp_cfg_dir, $core_cfg_dir,
$site_cfg_dir, $vendor_cfg_dir, $locallib_cfg_dir, $here_cfg_dir, $user_cfg_dir, $xdg_config_home);
push(@pure_bases, 3);
=head2 config_dirs
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/DesktopEntry.pm view on Meta::CPAN
die $@ if $@;
}
=head1 NAME
File::DesktopEntry - Object to handle .desktop files
=head1 SYNOPSIS
use File::DesktopEntry;
lib/File/DesktopEntry.pm view on Meta::CPAN
print "Using ".$entry->Name." to open http://perl.org\n";
$entry->run('http://perl.org');
=head1 DESCRIPTION
This module is designed to work with F<.desktop> files. The format of these files
is specified by the freedesktop "Desktop Entry" specification. This module can
parse these files but also knows how to run the applications defined by these
files.
For this module version 1.0 of the specification was used.
lib/File/DesktopEntry.pm view on Meta::CPAN
return $_[0]->get($AUTOLOAD);
}
=item C<lookup(NAME)>
Returns a filename for a desktop entry with desktop file id NAME.
=cut
sub lookup {
my (undef, $name) = @_;
$name .= '.desktop';
my $file = data_files('applications', $name);
if (! $file and $name =~ /-/) {
# name contains "-" and was not found
my @name = split /-/, $name;
$file = data_files('applications', @name);
lib/File/DesktopEntry.pm view on Meta::CPAN
return join '|', reverse @locale;
}
=item C<wants_uris( )>
Returns true if the Exec string for this desktop entry specifies that the
application uses URIs instead of paths. This can be used to determine
whether an application uses a VFS library.
=item C<wants_list( )>
Returns true if the Exec string for this desktop entry specifies that the
application can handle multiple arguments at once.
=cut
sub wants_uris {
my $self = shift;
my $exec = $self->get('Exec');
croak "No Exec string defined for desktop entry" unless length $exec;
$exec =~ s/\%\%//g;
return $exec =~ /\%U/i;
}
sub wants_list {
my $self = shift;
my $exec = $self->get('Exec');
croak "No Exec string defined for desktop entry" unless length $exec;
$exec =~ s/\%\%//g;
return $exec !~ /\%[fud]/; # we default to %F if no /\%[FUD]/i is found
}
=item C<run(@FILES)>
lib/File/DesktopEntry.pm view on Meta::CPAN
with arguments FILES as a background process. Returns the pid.
The child process fails when this is not a Desktop Entry of type Application
or if the Exec key is missing or invalid.
If the desktop entry specifies that the program needs to be executed in a
terminal the $TERMINAL environment variable is used. If this variable is not
set C<xterm -e> is used as default.
(On Windows this method returns a L<Win32::Process> object.)
lib/File/DesktopEntry.pm view on Meta::CPAN
}
}
=item C<parse_Exec(@FILES)>
Expands the Exec format in this desktop entry with. Returns a properly quoted
string in scalar context or a list of words in list context. Dies when the
Exec key is invalid.
It supports the following fields:
lib/File/DesktopEntry.pm view on Meta::CPAN
%F multiple files
%u single url
%U multiple urls
%i Icon field prefixed by --icon
%c Name field, possibly translated
%k location of this .desktop file
%% literal '%'
If necessary this method tries to convert between paths and URLs but this
is not perfect.
lib/File/DesktopEntry.pm view on Meta::CPAN
else { croak "Can not write empty Desktop Entry file" }
}
# Check keys
for (qw/Name Type/) {
croak "Can not write a desktop file without a $_ field"
unless defined $self->get($_);
}
$self->set(Version => '1.0', Encoding => 'UTF-8');
# Check file writable
lib/File/DesktopEntry.pm view on Meta::CPAN
sub _data_home_file {
# create new file name in XDG_DATA_HOME from name
my $self = shift;
my @parts = split /-/, $$self{name};
$parts[-1] .= '.desktop';
my $dir = data_home('applications', @parts[0 .. $#parts-1]);
unless (-d $dir) { # create dir if it doesn't exist
require File::Path;
File::Path::mkpath($dir);
}
lib/File/DesktopEntry.pm view on Meta::CPAN
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
=head1 SEE ALSO
L<http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html>
L<File::BaseDir> and L<File::MimeInfo::Applications>
L<X11::FreeDesktop::DesktopEntry>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/Extension.pm view on Meta::CPAN
'2mg' => 'Apple IIGS Disk Image',
'2sf' => 'Nintendo DS Sound File',
'2sflib' => 'Nintendo DS Audio Library File',
'323' => 'H.323 Internet Telephony File',
'32x' => 'Sega 32X ROM',
'360' => '360desktop Panorama File',
'386' => 'Windows Virtual Device Driver',
'3d' => 'Stereo CAD-3D Image File',
'3d2' => 'Stereo CAD-3D 2.0 Image File',
'3d4' => 'Stereo CAD-3D 2.0 Image File',
'3da' => '3D Assembly File',
lib/File/Extension.pm view on Meta::CPAN
'des' => 'QuickBooks Forms Template',
'desc' => 'Battlefield 2 Map Description File',
'design' => 'Microsoft Expression Design Drawing',
'desklink' => 'Desktop Shortcut',
'deskthemepac' => ' \'Windows 8 Desktop Theme Pack File',
'desktop' => 'Desktop Entry File',
'det' => 'Sage ACT! 5 Email Message',
'dev' => 'Dev-C++ Project File',
'developerpro' => 'I\'LE Xcode Developer Profile',
'develve' => 'Develve Data File',
'deviceids' => 'Device Identification FIle',
view all matches for this distribution
view release on metacpan or search on metacpan
DMIDecode.pm view on Meta::CPAN
dmidecode text file is output of dmidecode tool, which prints information about
DMI.
DMI (Desktop Management Interface) generates a standard framework for managing
and tracking components in a desktop, notebook or server computer, by
abstracting these components from the software that manages them.
See L<DMI on Wikipedia|https://en.wikipedia.org/wiki/Desktop_Management_Interface>.
=head1 SUBROUTINES
view all matches for this distribution
view release on metacpan or search on metacpan
$file->dirname->map([wav => 'flac'], 0);
$file->dirname->map([qw(wav flac)], 0);
($file &= λ{s/wav/flac/})->dirname &= λ{s/wav/flac/};
$file->map(λ{s/\.wav$/flac/})->dirname->map(λ{s/wav/flac/}, 0);
x $dir + 'foo/bar' problem
o freedesktop
o home
o mimeinfo
o basedir
o resolve() symlink chase-down
view all matches for this distribution
view release on metacpan or search on metacpan
use File::HomeDir ();
use File::HomeDir::PathClass;
use Path::Class;
use Test::More;
my @subs = qw{ my_home my_desktop my_documents my_music };
plan tests => scalar(@subs) * 2;
foreach my $sub ( @subs ) {
no strict 'refs';
my $dir = File::HomeDir::PathClass->$sub;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/HomeDir.pm view on Meta::CPAN
require Exporter;
@EXPORT = qw{home};
@EXPORT_OK = qw{
home
my_home
my_desktop
my_documents
my_music
my_pictures
my_videos
my_data
my_dist_config
my_dist_data
users_home
users_desktop
users_documents
users_music
users_pictures
users_videos
users_data
lib/File/HomeDir.pm view on Meta::CPAN
# Legacy Mac OS
$IMPLEMENTED_BY = 'File::HomeDir::MacOS9';
}
elsif (File::Which::which('xdg-user-dir'))
{
# freedesktop unixes
$IMPLEMENTED_BY = 'File::HomeDir::FreeDesktop';
}
else
{
# Default to Unix semantics
lib/File/HomeDir.pm view on Meta::CPAN
sub my_home
{
$IMPLEMENTED_BY->my_home;
}
sub my_desktop
{
$IMPLEMENTED_BY->can('my_desktop')
? $IMPLEMENTED_BY->my_desktop
: Carp::croak("The my_desktop method is not implemented on this platform");
}
sub my_documents
{
$IMPLEMENTED_BY->can('my_documents')
lib/File/HomeDir.pm view on Meta::CPAN
$IMPLEMENTED_BY->can('users_home')
? $IMPLEMENTED_BY->users_home($_[-1])
: Carp::croak("The users_home method is not implemented on this platform");
}
sub users_desktop
{
$IMPLEMENTED_BY->can('users_desktop')
? $IMPLEMENTED_BY->users_desktop($_[-1])
: Carp::croak("The users_desktop method is not implemented on this platform");
}
sub users_documents
{
$IMPLEMENTED_BY->can('users_documents')
lib/File/HomeDir.pm view on Meta::CPAN
use File::HomeDir;
# Modern Interface (Current User)
$home = File::HomeDir->my_home;
$desktop = File::HomeDir->my_desktop;
$docs = File::HomeDir->my_documents;
$music = File::HomeDir->my_music;
$pics = File::HomeDir->my_pictures;
$videos = File::HomeDir->my_videos;
$data = File::HomeDir->my_data;
$dist = File::HomeDir->my_dist_data('File-HomeDir');
$dist = File::HomeDir->my_dist_config('File-HomeDir');
# Modern Interface (Other Users)
$home = File::HomeDir->users_home('foo');
$desktop = File::HomeDir->users_desktop('foo');
$docs = File::HomeDir->users_documents('foo');
$music = File::HomeDir->users_music('foo');
$pics = File::HomeDir->users_pictures('foo');
$video = File::HomeDir->users_videos('foo');
$data = File::HomeDir->users_data('foo');
lib/File/HomeDir.pm view on Meta::CPAN
=head2 Platform Neutrality
In the Unix world, many different types of data can be mixed together
in your home directory (although on some Unix platforms this is no longer
the case, particularly for "desktop"-oriented platforms).
On some non-Unix platforms, separate directories are allocated for
different types of data and have been for a long time.
When writing applications on top of B<File::HomeDir>, you should thus
lib/File/HomeDir.pm view on Meta::CPAN
finding resources for the current user, and the C<users_method> (read as
"user's method") series for finding resources for arbitrary users.
This split is necessary, as on most platforms it is B<much> easier to find
information about the current user compared to other users, and indeed
on a number you cannot find out information such as C<users_desktop> at
all, due to security restrictions.
All methods will double check (using a C<-d> test) that a directory
actually exists before returning it, so you may trust in the values
that are returned (subject to the usual caveats of race conditions of
lib/File/HomeDir.pm view on Meta::CPAN
This is also the case for all of the other "my" methods.
Returns the directory path as a string, C<undef> if the current user
does not have a home directory, or dies on error.
=head2 my_desktop
The C<my_desktop> method takes no arguments and returns the "desktop"
directory for the current user.
Due to the diversity and complexity of implementations required to deal with
implementing the required functionality fully and completely, the
C<my_desktop> method may or may not be implemented on each platform.
That said, I am extremely interested in code to implement C<my_desktop> on
Unix, as long as it is capable of dealing (as the Windows implementation
does) with internationalization. It should also avoid false positive
results by making sure it only returns the appropriate directories for the
appropriate platforms.
Returns the directory path as a string, C<undef> if the current user
does not have a desktop directory, or dies on error.
=head2 my_documents
The C<my_documents> method takes no arguments and returns the directory (for
the current user) where the user's documents are stored.
lib/File/HomeDir.pm view on Meta::CPAN
The C<my_music> method takes no arguments and returns the directory
where the current user's music is stored.
No bias is made to any particular music type or music program, rather the
concept of a directory to hold the user's music is made at the level of the
underlying operating system or (at least) desktop environment.
Returns the directory path as a string, C<undef> if the current user
does not have a suitable directory, or dies on error.
=head2 my_pictures
lib/File/HomeDir.pm view on Meta::CPAN
The C<my_pictures> method takes no arguments and returns the directory
where the current user's pictures are stored.
No bias is made to any particular picture type or picture program, rather the
concept of a directory to hold the user's pictures is made at the level of the
underlying operating system or (at least) desktop environment.
Returns the directory path as a string, C<undef> if the current user
does not have a suitable directory, or dies on error.
=head2 my_videos
lib/File/HomeDir.pm view on Meta::CPAN
The C<my_videos> method takes no arguments and returns the directory
where the current user's videos are stored.
No bias is made to any particular video type or video program, rather the
concept of a directory to hold the user's videos is made at the level of the
underlying operating system or (at least) desktop environment.
Returns the directory path as a string, C<undef> if the current user
does not have a suitable directory, or dies on error.
=head2 my_data
lib/File/HomeDir.pm view on Meta::CPAN
$data = File::HomeDir->users_data('foo');
Returns the directory path as a string, C<undef> if that user
does not have a data directory, or dies on error.
=head2 users_desktop
$docs = File::HomeDir->users_desktop('foo');
Returns the directory path as a string, C<undef> if that user
does not have a desktop directory, or dies on error.
=head2 users_music
$docs = File::HomeDir->users_music('foo');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/KeePass/Agent/unix.pm view on Meta::CPAN
sub _copy_to_clipboard {
my ($self, $data) = @_;
if (my $klip = eval {
require Net::DBus;
my $bus = Net::DBus->find;
my $obj = $bus->get_service("org.freedesktop.DBus")->get_object("/org/freedesktop/DBus");
my %h = map {$_ => 1} @{ $obj->ListNames };
die "No klipper service found" unless $h{'org.kde.klipper'};
return $bus->get_service('org.kde.klipper')->get_object('/klipper');
}) {
$klip->setClipboardContents($data);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/LibMagic.pm view on Meta::CPAN
=head1 RELATED MODULES
Andreas created File::LibMagic because he wanted to use libmagic (from
file 4.x) L<File::MMagic> only worked with file 3.x.
L<File::MimeInfo::Magic> uses the magic file from freedesktop.org which is
encoded in XML, and is thus not the fastest approach. See
L<https://mail.gnome.org/archives/nautilus-list/2003-December/msg00260.html>
for a discussion of this issue.
L<File::Type> uses a relatively small magic file, which is directly hacked
view all matches for this distribution
view release on metacpan or search on metacpan
xtools/my-deb.sh view on Meta::CPAN
#------------------------------------------------------------------------------
# lintian .deb and source
lintian -I -i \
--suppress-tags new-package-should-close-itp-bug,desktop-entry-contains-encoding-key,command-in-menu-file-and-desktop-file,emacsen-common-without-dh-elpa,bugs-field-does-not-refer-to-debian-infrastructure \
${DEBNAME}_${VERSION}*_$DPKG_ARCH.deb
lintian -I -i \
--suppress-tags maintainer-upload-has-incorrect-version-number,changelog-should-mention-nmu,empty-debian-diff,debian-rules-uses-deprecated-makefile,testsuite-autopkgtest-missing *.dsc
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/MimeInfo.pm view on Meta::CPAN
: ( reverse data_files('mime/globs') );
if (@globfiles) {
$_has_mimeinfo_database = 1;
} else {
carp "WARNING: You don't seem to have a mime-info database. " .
"The shared-mime-info package is available from http://freedesktop.org/";
}
my @done;
for my $file (@globfiles) {
next if grep {$file eq $_} @done;
_hash_globs($file);
lib/File/MimeInfo.pm view on Meta::CPAN
my $mime_type2 = mimetype('test.png');
=head1 DESCRIPTION
This module can be used to determine the mime type of a file. It
tries to implement the freedesktop specification for a shared
MIME database.
For this module shared-mime-info-spec 0.13 was used.
This package only uses the globs file. No real magic checking is
lib/File/MimeInfo.pm view on Meta::CPAN
=head1 DIAGNOSTICS
This module throws an exception when it can't find any data files, when it can't
open a data file it found for reading or when a subroutine doesn't get enough arguments.
In the first case you either don't have the freedesktop mime info database installed,
or your environment variables point to the wrong places,
in the second case you have the database installed, but it is broken
(the mime info database should logically be world readable).
=head1 TODO
lib/File/MimeInfo.pm view on Meta::CPAN
in a straightforward manner only utf8 is supported (because the spec recommends this).
This module does not yet check extended attributes for a mimetype.
Patches for this are very welcome.
This module uses the FreeDesktop.org shared mime info database. On your desktop
linux this is typically pre-installed so it's not a problem. On your server
you can install the shared-mime-info package via apt or dnf or apk or whatnot.
To install on macOS, you can install it like this:
lib/File/MimeInfo.pm view on Meta::CPAN
=item related CPAN modules
L<File::MMagic>
=item freedesktop specifications used
L<http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec>,
L<http://www.freedesktop.org/wiki/Specifications/basedir-spec>,
L<http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec>
=item freedesktop mime database
L<http://www.freedesktop.org/wiki/Software/shared-mime-info>
=back
=cut
view all matches for this distribution