This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl -MMojo::DOM -E 'my $dom = Mojo::DOM->new( "testé×" ); say "$dom"' | |
test� |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use IO::File; | |
use IO::Dir; | |
my $base_dir = '/root/.cpanm/work/'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use IO::File; | |
use IO::Dir; | |
my $base_dir = '/root/.cpanm/work/'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open my $fh, '<', $big_file or die; | |
for my $line ( <$fh> ) { # this reads the whole file into memory | |
# ... | |
} | |
vs. | |
open my $fh, '<', $big_file or die; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my @data; | |
my $sth = $dbh->prepare( $sql ) or die $dbh->errstr; | |
$sth->execute; | |
while ( my @row = $sth->fetchrow_array ) { | |
push @data, [@row]; | |
} | |
open my $fh, '>', $flat_file or die $!; | |
print $fh @{$_},"\n" for @data; | |
close $fh; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS `dbix_class_deploymenthandler_versions`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `dbix_class_deploymenthandler_versions` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`version` varchar(50) NOT NULL, | |
`ddl` text, | |
`upgrade_sql` text, | |
PRIMARY KEY (`id`), | |
UNIQUE KEY `dbix_class_deploymenthandler_versions_version` (`version`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head2 File::HashCache | |
Bei Webanwendungen gibt es immer wieder das Problem, dass an JavaScript- oder CSS-Dateien etwas | |
angepasst wurde, diese Änderungen aber nicht sofort beim Benutzer ankommen, weil der | |
Browser die Datei cached. Hier hilft es, nach der Änderung den Namen der Datei anzupassen. | |
Um nicht hunderte Vorkommen der Einbindung des Skripts anzupassen - wobei man dabei garantiert | |
das eine oder andere Vorkommen vergisst -, kann man das Generieren der Datei automatisieren. | |
Hier hilft C<File::HashCache>. Auf Basis des Dateiinhalts wird der Dateiname erweitert und | |
in einem "Cache"-Verzeichnis gespeichert. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Self->{TicketAcl}->{DoNotOpenClosedProblems} = { | |
Properties => { | |
Ticket => { | |
State => ['closed successful', 'closed unsuccessful'], | |
Type => ['Problem'], | |
}, | |
}, | |
Possible => { | |
Ticket => { | |
State => ['closed successful', 'closed unsuccessful'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://pastie.org/755349 | |
http://ubertechs.blogspot.de/2011/06/salesforce-perl-using-wwwsalesforce.html | |
http://miguel.gualdron.com/2011/06/using-salesforcecoms-rest-api-from-perl.html | |
http://www.magat.ca/?p=58 | |
http://pastebin.com/cEyF4pZY | |
http://www.badpenguin.org/downloading-the-salesforce-addressbook-into-your-asterisk-pbx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ERROR: OTRS-CGI-10 Perl: 5.14.2 OS: linux Time: Sun Dec 8 21:12:44 2013 | |
Message: Run widget filter | |
RemoteAddress: 127.0.0.1 | |
RequestURI: /otrs/index.pl?Action=AgentITSMChangeZoom;ChangeID=8 | |
Traceback (9997): | |
Module: Kernel::Output::HTML::CustomerChangesInfoWidget::Run (v1.1) Line: 72 | |
Module: Kernel::Output::HTML::Layout::Output (OTRS 3.3.1) Line: 843 |
OlderNewer